Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #32776 > unrolled thread

Software RAID 1 array

Started bydoctor@doctor.nl2k.ab.ca (The Doctor)
First post2021-08-11 00:06 +0000
Last post2021-08-17 20:10 -0400
Articles 20 — 10 participants

Back to article view | Back to comp.os.linux.misc


Contents

  Software RAID 1 array doctor@doctor.nl2k.ab.ca (The Doctor) - 2021-08-11 00:06 +0000
    Re: Software RAID 1 array Andreas Kohlbach <ank@spamfence.net> - 2021-08-10 20:47 -0400
      OT Re: Software RAID 1 array Rinaldi <rm@nunya.inv> - 2021-08-10 22:54 -0500
      OT Re: Software RAID 1 array Rinaldi <rm@nunya.inv> - 2021-08-10 22:57 -0500
        Re: OT Re: Software RAID 1 array Marc Haber <mh+usenetspam1118@zugschl.us> - 2021-08-11 08:42 +0200
          Re: OT Re: Software RAID 1 array Andreas Kohlbach <ank@spamfence.net> - 2021-08-11 20:06 -0400
            Re: OT Re: Software RAID 1 array Marc Haber <mh+usenetspam1118@zugschl.us> - 2021-08-12 11:25 +0200
      Re: Software RAID 1 array Eli the Bearded <*@eli.users.panix.com> - 2021-08-12 18:30 +0000
    Re: Software RAID 1 array Marc Haber <mh+usenetspam1118@zugschl.us> - 2021-08-11 08:43 +0200
      Re: Software RAID 1 array doctor@doctor.nl2k.ab.ca (The Doctor) - 2021-08-11 14:19 +0000
    Re: Software RAID 1 array Pascal Hambourg <pascal@plouf.fr.eu.org> - 2021-08-11 11:06 +0200
      Re: Software RAID 1 array doctor@doctor.nl2k.ab.ca (The Doctor) - 2021-08-11 14:20 +0000
        Re: Software RAID 1 array Pascal Hambourg <pascal@plouf.fr.eu.org> - 2021-08-11 23:05 +0200
    Re: Software RAID 1 array Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-08-11 16:12 +0300
      Re: Software RAID 1 array Joe Beanfish <joebeanfish@nospam.duh> - 2021-08-11 15:15 +0000
        Re: Software RAID 1 array doctor@doctor.nl2k.ab.ca (The Doctor) - 2021-08-11 21:34 +0000
          Re: Software RAID 1 array "Carlos E. R." <robin_listas@es.invalid> - 2021-08-12 00:00 +0200
    Re: Software RAID 1 array Septal <r215a@h0gerth.net> - 2021-08-17 00:37 -0400
      Re: Software RAID 1 array doctor@doctor.nl2k.ab.ca (The Doctor) - 2021-08-17 04:52 +0000
        Re: Software RAID 1 array Septal <r215a@h0gerth.net> - 2021-08-17 20:10 -0400

#32776 — Software RAID 1 array

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2021-08-11 00:06 +0000
SubjectSoftware RAID 1 array
Message-ID<sev4b1$30ft$43@gallifrey.nk.ca>
Question how do you create a software RAID 1 array using

lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                    7:0    0   3.3G  0 loop /var/tmp
sda                      8:0    0 465.8G  0 disk 
├─sda1                   8:1    0     1G  0 part /boot
└─sda2                   8:2    0 464.8G  0 part 
  ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
    ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
      └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
      sdb                      8:16   0 931.5G  0 disk 
      └─sdb1                   8:17   0 931.5G  0 part 
      sr0                     11:0    1  1024M  0 rom 

fdisk -l

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8D33601F-80DB-48DF-8207-B26A027E4412

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048 1953523711 1953521664 931.5G Linux RAID


Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7e306797

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   2099199   2097152     1G fd Linux raid autodetect
/dev/sda2       2099200 976773119 974673920 464.8G 8e Linux LVM


sk /dev/mapper/almalinux_ns1-root: 70 GiB, 75161927680 bytes, 146800640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/almalinux_ns1-swap: 11.8 GiB, 12700352512 bytes, 24805376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/almalinux_ns1-home: 383 GiB, 411167621120 bytes, 803061760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop0: 3.3 GiB, 3516923904 bytes, 6868992 sectors
Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes



-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b  
Nova Scotia on 17 Aug 2021 vote Liberal! Beware https://mindspring.com

[toc] | [next] | [standalone]


#32778

FromAndreas Kohlbach <ank@spamfence.net>
Date2021-08-10 20:47 -0400
Message-ID<87lf58vmcg.fsf@usenet.ankman.de>
In reply to#32776
On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
>
> Question how do you create a software RAID 1 array using
>
> lsblk
> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> loop0                    7:0    0   3.3G  0 loop /var/tmp
> sda                      8:0    0 465.8G  0 disk 
> ├─sda1                   8:1    0     1G  0 part /boot
> └─sda2                   8:2    0 464.8G  0 part 

Your newsreader is not declaring any Transfer-Encoding and Content-Type
necessary for character outside US-ASCII.

| rn 4.0-test77 (Sep 1, 2010)
                        ^^^^

Most other newsreaders can this since the 1990s.
-- 
Andreas

PGP fingerprint 952B0A9F12C2FD6C9F7E68DAA9C2EA89D1A370E0

[toc] | [prev] | [next] | [standalone]


#32780 — OT Re: Software RAID 1 array

FromRinaldi <rm@nunya.inv>
Date2021-08-10 22:54 -0500
SubjectOT Re: Software RAID 1 array
Message-ID<f1c66cfb-f1d6-5849-5448-3eb4861fa64f@invalid.com>
In reply to#32778
On 8/10/21 7:47 PM, Andreas Kohlbach wrote:
> On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
>>
>> Question how do you create a software RAID 1 array using
>>
>> lsblk
>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>> sda                      8:0    0 465.8G  0 disk
>> ├─sda1                   8:1    0     1G  0 part /boot
>> └─sda2                   8:2    0 464.8G  0 part
> 
> Your newsreader is not declaring any Transfer-Encoding and Content-Type
> necessary for character outside US-ASCII.
> 
> | rn 4.0-test77 (Sep 1, 2010)
>                          ^^^^
> 
> Most other newsreaders can this since the 1990s.
> 
Shows fine here with the character encoding set to unicode.

[toc] | [prev] | [next] | [standalone]


#32781 — OT Re: Software RAID 1 array

FromRinaldi <rm@nunya.inv>
Date2021-08-10 22:57 -0500
SubjectOT Re: Software RAID 1 array
Message-ID<291a7af2-7f5b-253f-f619-e2ab89cb7f12@invalid.com>
In reply to#32778
On 8/10/21 7:47 PM, Andreas Kohlbach wrote:
> On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
>>
>> Question how do you create a software RAID 1 array using
>>
>> lsblk
>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>> sda                      8:0    0 465.8G  0 disk
>> ├─sda1                   8:1    0     1G  0 part /boot
>> └─sda2                   8:2    0 464.8G  0 part
> 
> Your newsreader is not declaring any Transfer-Encoding and Content-Type
> necessary for character outside US-ASCII.
> 
> | rn 4.0-test77 (Sep 1, 2010)
>                          ^^^^
> 
> Most other newsreaders can this since the 1990s.
> 
Shows fine here with the character encoding set to unicode.

sda                      8:0    0 465.8G  0 disk
├─sda1                   8:1    0     1G  0 part /boot
└─sda2                   8:2    0 464.8G  0 part ....

[toc] | [prev] | [next] | [standalone]


#32782 — Re: OT Re: Software RAID 1 array

FromMarc Haber <mh+usenetspam1118@zugschl.us>
Date2021-08-11 08:42 +0200
SubjectRe: OT Re: Software RAID 1 array
Message-ID<sevrgn$9bf$1@news1.tnib.de>
In reply to#32781
Rinaldi <rm@nunya.inv> wrote:
>On 8/10/21 7:47 PM, Andreas Kohlbach wrote:
>> On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
>>>
>>> Question how do you create a software RAID 1 array using
>>>
>>> lsblk
>>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>>> sda                      8:0    0 465.8G  0 disk
>>> ├─sda1                   8:1    0     1G  0 part /boot
>>> └─sda2                   8:2    0 464.8G  0 part
>> 
>> Your newsreader is not declaring any Transfer-Encoding and Content-Type
>> necessary for character outside US-ASCII.
>> 
>> | rn 4.0-test77 (Sep 1, 2010)
>>                          ^^^^
>> 
>> Most other newsreaders can this since the 1990s.
>> 
>Shows fine here with the character encoding set to unicode.

That's luck by guessing the encoding. The absence of declaration makes
it impossible to automatically and correctly choose. It's a nearly 30
years old standard.

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

[toc] | [prev] | [next] | [standalone]


#32796 — Re: OT Re: Software RAID 1 array

FromAndreas Kohlbach <ank@spamfence.net>
Date2021-08-11 20:06 -0400
SubjectRe: OT Re: Software RAID 1 array
Message-ID<87fsvfv858.fsf@usenet.ankman.de>
In reply to#32782
On Wed, 11 Aug 2021 08:42:31 +0200, Marc Haber wrote:
>
> Rinaldi <rm@nunya.inv> wrote:
>>On 8/10/21 7:47 PM, Andreas Kohlbach wrote:
>>> On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
>>>>
>>>> Question how do you create a software RAID 1 array using
>>>>
>>>> lsblk
>>>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>>>> sda                      8:0    0 465.8G  0 disk
>>>> ├─sda1                   8:1    0     1G  0 part /boot
>>>> └─sda2                   8:2    0 464.8G  0 part
>>> 
>>> Your newsreader is not declaring any Transfer-Encoding and Content-Type
>>> necessary for character outside US-ASCII.
>>> 
>>> | rn 4.0-test77 (Sep 1, 2010)
>>>                          ^^^^
>>> 
>>> Most other newsreaders can this since the 1990s.
>>> 
>>Shows fine here with the character encoding set to unicode.
>
> That's luck by guessing the encoding.

Agreed (he uses Thunderbird). Like Outlook Express also played the
guessing game in the past. I could probably also teach Gnus to do
this. But why. It's not my job to "correct" things, which are otherwise
standard since decades.
-- 
Andreas

[toc] | [prev] | [next] | [standalone]


#32797 — Re: OT Re: Software RAID 1 array

FromMarc Haber <mh+usenetspam1118@zugschl.us>
Date2021-08-12 11:25 +0200
SubjectRe: OT Re: Software RAID 1 array
Message-ID<sf2pet$959$1@news1.tnib.de>
In reply to#32796
Andreas Kohlbach <ank@spamfence.net> wrote:
>Agreed (he uses Thunderbird). Like Outlook Express also played the
>guessing game in the past.

Outlook Express never guessed, it was just sometimes lucky.

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

[toc] | [prev] | [next] | [standalone]


#32799

FromEli the Bearded <*@eli.users.panix.com>
Date2021-08-12 18:30 +0000
Message-ID<eli$2108121429@qaz.wtf>
In reply to#32778
In comp.os.linux.misc, Andreas Kohlbach  <ank@spamfence.net> wrote:
> On Wed, 11 Aug 2021 00:06:57 -0000 (UTC), The Doctor wrote:
> > sda                      8:0    0 465.8G  0 disk 
> > ├─sda1                   8:1    0     1G  0 part /boot
> > └─sda2                   8:2    0 464.8G  0 part 

Oh, fun mojibake.

> Your newsreader is not declaring any Transfer-Encoding and Content-Type
> necessary for character outside US-ASCII.
> | rn 4.0-test77 (Sep 1, 2010)

You clipped the 't' off of trn.

> Most other newsreaders can this since the 1990s.

trn 4.0-test77 has got some serious Unicode problems. I'm using the
fork here:

https://github.com/acli/trn

Which is 800% better than trn4 test77 with my one line "don't mangle
Unicode" patch:

https://sourceforge.net/p/trn/patches/6/

But trn4 has divorced reading from posting, and by virtue of not having
a built in editor (using $EDITOR or $VISUAL like a good Unix program),
it has a very hard time enforcing appropriate headers on outgoing
posts. I believe the acli native Pnews does it one way, and my own
Pnews does it another way.[*] 

But it does boil down to: trn is very permissive about posting and has
poor defaults for headers, and no enforcement of sending bad headers
or omitting headers not absolutely required by NNTP.

My main reason for chiming in here is to strongly encourage anyone still
using trn to switch to the acli fork. Life is much better.

[*] The acli Pnews checks $LC_CTYPE and then sets charset based on
    that all the time. For me, this breaks when I'm replying to a
    ISO-8869-1 post with highbit characters, because vim will 
    do a good job of guessing charset, converting to UTF-8 to
    edit, then converting back to ISO-8869-1 on save. Presto,
    header lies.

    My Pnews never adds MIME headers, but checks for a charset in
    the headers and flags it as an error if the charset does not
    match or, when missing and is needed.

    I should clean up and release the code to my Pnews someday.

Elijah
------
first learned a ton of sh coding tricks examining Rnmail and Pnews

[toc] | [prev] | [next] | [standalone]


#32783

FromMarc Haber <mh+usenetspam1118@zugschl.us>
Date2021-08-11 08:43 +0200
Message-ID<sevrhs$9bm$1@news1.tnib.de>
In reply to#32776
doctor@doctor.nl2k.ab.ca (The Doctor) wrote:
>Question how do you create a software RAID 1 array using
>
>lsblk
>NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>loop0                    7:0    0   3.3G  0 loop /var/tmp
>sda                      8:0    0 465.8G  0 disk 
>??sda1                   8:1    0     1G  0 part /boot
>??sda2                   8:2    0 464.8G  0 part 
>  ??almalinux_ns1-root 253:0    0    70G  0 lvm  /
>    ??almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>      ??almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>      sdb                      8:16   0 931.5G  0 disk 
>      ??sdb1                   8:17   0 931.5G  0 part 
>      sr0                     11:0    1  1024M  0 rom 

Is this a trick question? Which Documentation did you read? what did
you try? Why did your tries fail?

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

[toc] | [prev] | [next] | [standalone]


#32787

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2021-08-11 14:19 +0000
Message-ID<sf0m9b$1pde$69@gallifrey.nk.ca>
In reply to#32783
In article <sevrhs$9bm$1@news1.tnib.de>,
Marc Haber  <mh+usenetspam1118@zugschl.us> wrote:
>doctor@doctor.nl2k.ab.ca (The Doctor) wrote:
>>Question how do you create a software RAID 1 array using
>>
>>lsblk
>>NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>loop0                    7:0    0   3.3G  0 loop /var/tmp
>>sda                      8:0    0 465.8G  0 disk 
>>??sda1                   8:1    0     1G  0 part /boot
>>??sda2                   8:2    0 464.8G  0 part 
>>  ??almalinux_ns1-root 253:0    0    70G  0 lvm  /
>>    ??almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>>      ??almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>>      sdb                      8:16   0 931.5G  0 disk 
>>      ??sdb1                   8:17   0 931.5G  0 part 
>>      sr0                     11:0    1  1024M  0 rom 
>
>Is this a trick question? Which Documentation did you read? what did
>you try? Why did your tries fail?


No trick.  Trying at leat mdadm.



>-- 
>-------------------------------------- !! No courtesy copies, please !! -----
>Marc Haber         |   " Questions are the         | Mailadresse im Header
>Mannheim, Germany  |     Beginning of Wisdom "     | 
>Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b  
Nova Scotia on 17 Aug 2021 vote Liberal! Beware https://mindspring.com

[toc] | [prev] | [next] | [standalone]


#32784

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2021-08-11 11:06 +0200
Message-ID<6113930d$0$3737$426a74cc@news.free.fr>
In reply to#32776
Le 11/08/2021 à 02:06, The Doctor a écrit :
> Question how do you create a software RAID 1 array using
> 
> lsblk
> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> loop0                    7:0    0   3.3G  0 loop /var/tmp
> sda                      8:0    0 465.8G  0 disk
> ├─sda1                   8:1    0     1G  0 part /boot
> └─sda2                   8:2    0 464.8G  0 part
>    ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>      ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>        └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>        sdb                      8:16   0 931.5G  0 disk
>        └─sdb1                   8:17   0 931.5G  0 part
>        sr0                     11:0    1  1024M  0 rom

You need to tell more about what you want to achieve.
Wipe everything and create one big RAID array ?
Or move the LVM volumes into a RAID array ?
For the latter, you may
- delete sdb1
- create sdb1 and sdb2 with the same sizes as sda1 and sda2
- create a degraded RAID array with sdb2
- create a LVM PV in the RAID array
- extend the LVM VG with the PV inside the RAID array
- move LVM data from sda2 to the RAID array
- remove sda2 from the LVM VG
- add sda2 to the RAID array
- if required, update the initramfs before rebooting

If you want boot redundancy and have a compatible boot loader (GRUB), 
you may additionally
- create a "BIOS boot" partition sdb3 in the free space before sdb1
- create a 2nd degraded RAID array with sdb1
- format the 2nd RAID array and mount it
- copy the contents of /boot to the 2nd RAID array
- unmount /boot
- wipe sda1 and add it to the 2nd RAID array
- mount the 2nd RAID array on /boot and update /etc/fstab accordingly
- reinstall the boot loader on both disks

You may need to adjust some sizes in the process to make room for RAID 
superblocks.

[toc] | [prev] | [next] | [standalone]


#32788

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2021-08-11 14:20 +0000
Message-ID<sf0mat$1pde$70@gallifrey.nk.ca>
In reply to#32784
In article <6113930d$0$3737$426a74cc@news.free.fr>,
Pascal Hambourg  <pascal@plouf.fr.eu.org> wrote:
>Le 11/08/2021 à 02:06, The Doctor a écrit :
>> Question how do you create a software RAID 1 array using
>> 
>> lsblk
>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>> sda                      8:0    0 465.8G  0 disk
>> ├─sda1                   8:1    0     1G  0 part /boot
>> └─sda2                   8:2    0 464.8G  0 part
>>    ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>>      ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>>        └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>>        sdb                      8:16   0 931.5G  0 disk
>>        └─sdb1                   8:17   0 931.5G  0 part
>>        sr0                     11:0    1  1024M  0 rom
>
>You need to tell more about what you want to achieve.
>Wipe everything and create one big RAID array ?
>Or move the LVM volumes into a RAID array ?
>For the latter, you may
>- delete sdb1
>- create sdb1 and sdb2 with the same sizes as sda1 and sda2
>- create a degraded RAID array with sdb2
>- create a LVM PV in the RAID array
>- extend the LVM VG with the PV inside the RAID array
>- move LVM data from sda2 to the RAID array
>- remove sda2 from the LVM VG
>- add sda2 to the RAID array
>- if required, update the initramfs before rebooting
>
>If you want boot redundancy and have a compatible boot loader (GRUB), 
>you may additionally
>- create a "BIOS boot" partition sdb3 in the free space before sdb1
>- create a 2nd degraded RAID array with sdb1
>- format the 2nd RAID array and mount it
>- copy the contents of /boot to the 2nd RAID array
>- unmount /boot
>- wipe sda1 and add it to the 2nd RAID array
>- mount the 2nd RAID array on /boot and update /etc/fstab accordingly
>- reinstall the boot loader on both disks
>
>You may need to adjust some sizes in the process to make room for RAID 
>superblocks.

Useful answer.

Carry on.
-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b  
Nova Scotia on 17 Aug 2021 vote Liberal! Beware https://mindspring.com

[toc] | [prev] | [next] | [standalone]


#32792

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2021-08-11 23:05 +0200
Message-ID<61143bac$0$27444$426a74cc@news.free.fr>
In reply to#32788
Le 11/08/2021 à 16:20, The Doctor a écrit :
> 
> Carry on.

Can you elaborate ?

[toc] | [prev] | [next] | [standalone]


#32786

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2021-08-11 16:12 +0300
Message-ID<sf0ibt$opl$1@dont-email.me>
In reply to#32776
RAID 1 is a mirror, meaning that there is a copy of all
data in both participants. There is little sense to build
a mirror array of two different size disks, the larger
unit can be used only to the size of the smaller unit.

In this case, the array would be 485G in size, and the
rest of /dev/sdb would be unavailable.

-- 

-TV


On 11.8.21 3.06, The Doctor wrote:
> Question how do you create a software RAID 1 array using
> 
> lsblk
> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> loop0                    7:0    0   3.3G  0 loop /var/tmp
> sda                      8:0    0 465.8G  0 disk
> ├─sda1                   8:1    0     1G  0 part /boot
> └─sda2                   8:2    0 464.8G  0 part
>    ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>      ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>        └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>        sdb                      8:16   0 931.5G  0 disk
>        └─sdb1                   8:17   0 931.5G  0 part
>        sr0                     11:0    1  1024M  0 rom
> 
> fdisk -l
> 
> Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> Disk identifier: 8D33601F-80DB-48DF-8207-B26A027E4412
> 
> Device     Start        End    Sectors   Size Type
> /dev/sdb1   2048 1953523711 1953521664 931.5G Linux RAID
> 
> 
> Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x7e306797
> 
> Device     Boot   Start       End   Sectors   Size Id Type
> /dev/sda1  *       2048   2099199   2097152     1G fd Linux raid autodetect
> /dev/sda2       2099200 976773119 974673920 464.8G 8e Linux LVM
> 
> 
> sk /dev/mapper/almalinux_ns1-root: 70 GiB, 75161927680 bytes, 146800640 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/mapper/almalinux_ns1-swap: 11.8 GiB, 12700352512 bytes, 24805376 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/mapper/almalinux_ns1-home: 383 GiB, 411167621120 bytes, 803061760 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop0: 3.3 GiB, 3516923904 bytes, 6868992 sectors
> Units: sectors of 1 * 512 = 512 bytes
> 
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#32789

FromJoe Beanfish <joebeanfish@nospam.duh>
Date2021-08-11 15:15 +0000
Message-ID<sf0phv$j7r$1@dont-email.me>
In reply to#32786
On Wed, 11 Aug 2021 16:12:26 +0300, Tauno Voipio wrote:

> RAID 1 is a mirror, meaning that there is a copy of all
> data in both participants. There is little sense to build
> a mirror array of two different size disks, the larger
> unit can be used only to the size of the smaller unit.
> 
> In this case, the array would be 485G in size, and the
> rest of /dev/sdb would be unavailable.

One could create a non-mirrored, but useful, partition
from the extra space on sdb.

[toc] | [prev] | [next] | [standalone]


#32793

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2021-08-11 21:34 +0000
Message-ID<sf1fo9$2ko6$21@gallifrey.nk.ca>
In reply to#32789
In article <sf0phv$j7r$1@dont-email.me>,
Joe Beanfish  <joebeanfish@nospam.duh> wrote:
>On Wed, 11 Aug 2021 16:12:26 +0300, Tauno Voipio wrote:
>
>> RAID 1 is a mirror, meaning that there is a copy of all
>> data in both participants. There is little sense to build
>> a mirror array of two different size disks, the larger
>> unit can be used only to the size of the smaller unit.
>> 
>> In this case, the array would be 485G in size, and the
>> rest of /dev/sdb would be unavailable.
>
>One could create a non-mirrored, but useful, partition
>from the extra space on sdb.

Hardward Raid contrller does not exist in this system.
-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b  
Nova Scotia on 17 Aug 2021 vote Liberal! Beware https://mindspring.com

[toc] | [prev] | [next] | [standalone]


#32795

From"Carlos E. R." <robin_listas@es.invalid>
Date2021-08-12 00:00 +0200
Message-ID<7ttduhx1fn.ln2@minas-tirith.valinor>
In reply to#32793
On 11/08/2021 23.34, The Doctor wrote:
> In article <sf0phv$j7r$1@dont-email.me>,
> Joe Beanfish  <joebeanfish@nospam.duh> wrote:
>> On Wed, 11 Aug 2021 16:12:26 +0300, Tauno Voipio wrote:
>>
>>> RAID 1 is a mirror, meaning that there is a copy of all
>>> data in both participants. There is little sense to build
>>> a mirror array of two different size disks, the larger
>>> unit can be used only to the size of the smaller unit.
>>>
>>> In this case, the array would be 485G in size, and the
>>> rest of /dev/sdb would be unavailable.
>>
>> One could create a non-mirrored, but useful, partition
>>from the extra space on sdb.
> 
> Hardward Raid contrller does not exist in this system.
> 

Not needed.

-- 
Cheers,
       Carlos E.R.

[toc] | [prev] | [next] | [standalone]


#32805

FromSeptal <r215a@h0gerth.net>
Date2021-08-17 00:37 -0400
Message-ID<6oidnX1ssc-HoIb8nZ2dnUU7-cnNnZ2d@earthlink.com>
In reply to#32776
On 08/10/2021 08:06 PM, The Doctor wrote:
> Question how do you create a software RAID 1 array using
> 
> lsblk
> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> loop0                    7:0    0   3.3G  0 loop /var/tmp
> sda                      8:0    0 465.8G  0 disk
> ├─sda1                   8:1    0     1G  0 part /boot
> └─sda2                   8:2    0 464.8G  0 part
>    ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>      ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>        └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>        sdb                      8:16   0 931.5G  0 disk
>        └─sdb1                   8:17   0 931.5G  0 part
>        sr0                     11:0    1  1024M  0 rom
> 
> fdisk -l
> 
> Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> Disk identifier: 8D33601F-80DB-48DF-8207-B26A027E4412
> 
> Device     Start        End    Sectors   Size Type
> /dev/sdb1   2048 1953523711 1953521664 931.5G Linux RAID
> 
> 
> Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x7e306797
> 
> Device     Boot   Start       End   Sectors   Size Id Type
> /dev/sda1  *       2048   2099199   2097152     1G fd Linux raid autodetect
> /dev/sda2       2099200 976773119 974673920 464.8G 8e Linux LVM
> 
> 
> sk /dev/mapper/almalinux_ns1-root: 70 GiB, 75161927680 bytes, 146800640 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/mapper/almalinux_ns1-swap: 11.8 GiB, 12700352512 bytes, 24805376 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/mapper/almalinux_ns1-home: 383 GiB, 411167621120 bytes, 803061760 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop0: 3.3 GiB, 3516923904 bytes, 6868992 sectors
> Units: sectors of 1 * 512 = 512 bytes
> 
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes

   EEEK ! Awfully specific there ...

   Try OpenSuse/Tumbleweed. Their YAST utility makes
   setting up RAID-1 disks pretty quick and easy. In
   SOME cases the setup might be detected and work even
   if you later switch to another distro.

[toc] | [prev] | [next] | [standalone]


#32806

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2021-08-17 04:52 +0000
Message-ID<sfffa0$1639$36@gallifrey.nk.ca>
In reply to#32805
In article <6oidnX1ssc-HoIb8nZ2dnUU7-cnNnZ2d@earthlink.com>,
Septal  <r215a@h0gerth.net> wrote:
>On 08/10/2021 08:06 PM, The Doctor wrote:
>> Question how do you create a software RAID 1 array using
>> 
>> lsblk
>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>> sda                      8:0    0 465.8G  0 disk
>> ├─sda1                   8:1    0     1G  0 part /boot
>> └─sda2                   8:2    0 464.8G  0 part
>>    ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>>      ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>>        └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>>        sdb                      8:16   0 931.5G  0 disk
>>        └─sdb1                   8:17   0 931.5G  0 part
>>        sr0                     11:0    1  1024M  0 rom
>> 
>> fdisk -l
>> 
>> Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disklabel type: gpt
>> Disk identifier: 8D33601F-80DB-48DF-8207-B26A027E4412
>> 
>> Device     Start        End    Sectors   Size Type
>> /dev/sdb1   2048 1953523711 1953521664 931.5G Linux RAID
>> 
>> 
>> Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disklabel type: dos
>> Disk identifier: 0x7e306797
>> 
>> Device     Boot   Start       End   Sectors   Size Id Type
>> /dev/sda1  *       2048   2099199   2097152     1G fd Linux raid autodetect
>> /dev/sda2       2099200 976773119 974673920 464.8G 8e Linux LVM
>> 
>> 
>> sk /dev/mapper/almalinux_ns1-root: 70 GiB, 75161927680 bytes,
>146800640 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> 
>> 
>> Disk /dev/mapper/almalinux_ns1-swap: 11.8 GiB, 12700352512 bytes,
>24805376 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> 
>> 
>> Disk /dev/mapper/almalinux_ns1-home: 383 GiB, 411167621120 bytes,
>803061760 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> 
>> 
>> Disk /dev/loop0: 3.3 GiB, 3516923904 bytes, 6868992 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> 
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>
>   EEEK ! Awfully specific there ...
>
>   Try OpenSuse/Tumbleweed. Their YAST utility makes
>   setting up RAID-1 disks pretty quick and easy. In
>   SOME cases the setup might be detected and work even
>   if you later switch to another distro.

Suck with Alma.  I have to use CPanel.
-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b  
Nova Scotia on 17 Aug 2021 vote Liberal! Beware https://mindspring.com

[toc] | [prev] | [next] | [standalone]


#32807

FromSeptal <r215a@h0gerth.net>
Date2021-08-17 20:10 -0400
Message-ID<E6qdnbjDSqty0oH8nZ2dnUU7-cHNnZ2d@earthlink.com>
In reply to#32806
On 08/17/2021 12:52 AM, The Doctor wrote:
> In article <6oidnX1ssc-HoIb8nZ2dnUU7-cnNnZ2d@earthlink.com>,
> Septal  <r215a@h0gerth.net> wrote:
>> On 08/10/2021 08:06 PM, The Doctor wrote:
>>> Question how do you create a software RAID 1 array using
>>>
>>> lsblk
>>> NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> loop0                    7:0    0   3.3G  0 loop /var/tmp
>>> sda                      8:0    0 465.8G  0 disk
>>> ├─sda1                   8:1    0     1G  0 part /boot
>>> └─sda2                   8:2    0 464.8G  0 part
>>>     ├─almalinux_ns1-root 253:0    0    70G  0 lvm  /
>>>       ├─almalinux_ns1-swap 253:1    0  11.8G  0 lvm  [SWAP]
>>>         └─almalinux_ns1-home 253:2    0   383G  0 lvm  /home
>>>         sdb                      8:16   0 931.5G  0 disk
>>>         └─sdb1                   8:17   0 931.5G  0 part
>>>         sr0                     11:0    1  1024M  0 rom
>>>
>>> fdisk -l
>>>
>>> Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Disklabel type: gpt
>>> Disk identifier: 8D33601F-80DB-48DF-8207-B26A027E4412
>>>
>>> Device     Start        End    Sectors   Size Type
>>> /dev/sdb1   2048 1953523711 1953521664 931.5G Linux RAID
>>>
>>>
>>> Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Disklabel type: dos
>>> Disk identifier: 0x7e306797
>>>
>>> Device     Boot   Start       End   Sectors   Size Id Type
>>> /dev/sda1  *       2048   2099199   2097152     1G fd Linux raid autodetect
>>> /dev/sda2       2099200 976773119 974673920 464.8G 8e Linux LVM
>>>
>>>
>>> sk /dev/mapper/almalinux_ns1-root: 70 GiB, 75161927680 bytes,
>> 146800640 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>>
>>>
>>> Disk /dev/mapper/almalinux_ns1-swap: 11.8 GiB, 12700352512 bytes,
>> 24805376 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>>
>>>
>>> Disk /dev/mapper/almalinux_ns1-home: 383 GiB, 411167621120 bytes,
>> 803061760 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>>
>>>
>>> Disk /dev/loop0: 3.3 GiB, 3516923904 bytes, 6868992 sectors
>>> Units: sectors of 1 * 512 = 512 bytes
>>>
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>
>>    EEEK ! Awfully specific there ...
>>
>>    Try OpenSuse/Tumbleweed. Their YAST utility makes
>>    setting up RAID-1 disks pretty quick and easy. In
>>    SOME cases the setup might be detected and work even
>>    if you later switch to another distro.
> 
> Suck with Alma.  I have to use CPanel.

   cPanel ain't so bad .. for managing your ISP account.

   However I've never seen it used for setting up RAID.

   I did write myself some instructions for setting up RAID
   using nothing but command-line. It is tedious and involved,
   too much work software could/should do for you these days.
   This is why I suggested OpenSuse and YAST - two minutes,
   and it helps you pick the ideal block sizes and such.

   If you want I can find and post said instructions. They
   were for Centos-7 (before IBM attacked). Some of those CL
   utilities are NOT transparent or work like you'd expect

   Anyway, linux software RAID does work well. The only evil
   I ever ran into was a Centos-8 box ... but that turned out
   to be hidden bad tracks on the HD, causing rather silently
   corrupted inodes. It'd work, until you rebooted. THEN you'd
   get the "copy/confirm" thing over and over hundreds of
   times. In any case, PCs are fast enough now so you won't
   lose speed using softraid over hardware raid, at least
   for simple RAID-1. Didn't notice much diff with RAID-5/6
   either. Now WINDOWS ... you are really better off using
   a motherboard with RAID in the bios or a separate RAID
   controller card. Windows softraid isn't REALLY what it
   sounds like.



[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.misc


csiph-web