LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   full soft raid 1 with slackware (https://www.linuxquestions.org/questions/slackware-14/full-soft-raid-1-with-slackware-635004/)

bennethos 04-13-2008 05:10 AM

full soft raid 1 with slackware
 
Hi,

I got a server with 2 sata disks that I want to put in a bootable soft raid...

I want the following partition scheme

/ primary part 1
/home primary part 2
swap primary part 3
extended part
/usr extended 1
/tmp ...
/var ...
/opt ...

- set all the flags to FD (raid autodetect) with fdisk
- copy the part scheme using sfdisk to my 2nd disk

Got couple of questions concerning this setup...

* I read I have to put all the partition flags to FD (raid autodetect) but what about the swap partition ?

* I can't seem to put my extended partition in the raid 1 using mdadm, skipping it might give probs when a disk fails I guess ? Or should I use LVM for more than 4 partitions ?

* when creating the arrays I do :
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
and so on...

Is this correct or can I just do :
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb and create all the partitions under /dev/md0 ...

thx, i'm a bit confused here ;-)

dkm999 04-13-2008 11:24 PM

It's not too surprising that you are a bit confused by all this, because there is seriously contradictory information floating about on the 'Net concerning this point. When I tried the same thing using Fedora, I found that, even though the mdadm stuff seems to say that you can have multiple partitions under a single RAID set, it doesn't actually work. The best I was able to come up with was to configure things so that each partition ran as a separate RAID set, though I later learned that (theoretically) a single LVM that contains several partitions can run under one RAID set.

So in your case, I see 3 RAID sets: one for the root and boot stuff; one for the swap partition, and one for a LVM containing everything else (/home, /usr, /tmp, ...). In addition, you might want to do some more reading to decide if you really want the swap partition to be RAIDed. There appear to be arguments both ways about this.

Good luck.

bennethos 04-17-2008 10:03 AM

thx, also read some people put the swap partition in striping instead of mirror...
1 problem, if a disk fails you dont have a swap anymore... But it seems there's a workaround for that.

Anyways, i'll try to read up a bit more, happy to know i'm not the only one confused about the subject, cant even find a decent book about software raid (recent one, explaining mdadm for 2.6 kernels etc..)

mRgOBLIN 04-17-2008 04:19 PM

I never bother putting my swap on raid I just add them to fstab with the same priority.

Code:

/dev/sda3        swap            swap        pri=1        0  0
/dev/sdb3        swap            swap        pri=1        0  0
/dev/sdc3        swap            swap        pri=1        0  0

Might find some useful info here

http://www.userlocal.com/articles/ra...ackware-12.php


All times are GMT -5. The time now is 05:41 AM.