RAID design
Hi All,
First I wish to thanks you guys for your answers, I really apreciate. Now I have a question about RAID design.
I am trying to implement the best soft RAID system for a samba fileserver as safer as possible.
Here is my first idea:
1) Using a small hard drive for the OS (2gigs)
plugged as IDE 1 master (won't take part of the raid array).
2) Using two 120 gig for the fileserver in a raid1 array The first one will be as IDE1 slave and the second one as IDE2 master (the cdrom drive will be IDE2 slave).
The weakness here will be if the first hard drive with the OS failed.
My second idea is:
Use only 2 120 gig hard drives and implement a root raid array including the OS. The first one as IDE1 master and the second one as IDE2 master. (The cdrom drive as IDE1 slave).
I am not RAID expert but I really don't see the benefits of including the OS in the RAID array as if the primary HD failed, the system won't be able to boot anyway. Am I right ?
I mean if the primary disk failed, even if I ask the BIOS to boot the second hard drive, the system won't boot as everything is linked to hda in the system.
As you can see I am a little confused about root-raid and the benefits, if someone
could give me some advices and tell me which solution is the best I would really appreciate.
Thanks a lot and have a nice day.
--
Mikael Chambon
Quoted 12 lines · Mikael Chambon
Hi All,
First I wish to thanks you guys for your answers, I really apreciate. Now I have a question about RAID design.I am trying to implement the best soft RAID system for a samba fileserver as safer as possible.
Here is my first idea:
1) Using a small hard drive for the OS (2gigs)
plugged as IDE 1 master (won't take part of the raid array).
Quoted 6 lines
2) Using two 120 gig for the fileserver in a raid1 array The first one will be as IDE1 slave and the second one as IDE2 master (the cdrom drive will be IDE2 slave).
The weakness here will be if the first hard drive with the OS failed.
It's a double weakness too - it's possible (and I've had it happen to me) for one drive on a controller to take the other one out with it too. In my case, when I removed the offending drive, the other drive was OK and intact, but who knows. So should your data drive fail on the first controller, it may not only take that out, but your OS disk out too. Remove the data drive and reboot and it may work, but ...
Quoted 1 line
My second idea is:
Much better IMO :)
Quoted 3 lines
Use only 2 120 gig hard drives and implement a root raid array including the OS. The first one as IDE1 master and the second one as IDE2 master. (The cdrom drive as IDE1 slave).
Unless you actually need the CDROM, I'd unplug it.
Quoted 3 lines
I am not RAID expert but I really don't see the benefits of including the OS in the RAID array as if the primary HD failed, the system won't be able to boot anyway. Am I right ?
Not neccessarily. Modern motherboards will boot of either on-board controller, so if the primary failed, then the master drive on the 2nd controller ought to be able to boot. It's worth checking your motherboard though. All the systems I've built in the past 2-3 years like this have had this ability. You may need to physically unplug the failed drive though (and reboot) if it fails in a way that make it look like it's still active.
Quoted 3 lines
I mean if the primary disk failed, even if I ask the BIOS to boot the second hard drive, the system won't boot as everything is linked to hda in the system.
Make everything RAID1 then it'll "just work". Not all distributions let you do this at install time though. I use Debian which doesn't let you do it at boot time, so it's a little fiddly, but the Root-RAID How-To does exactly what it says on the tin...
What I'd do: Partition both drives exactly the same and RAID one on all the partitions. Even swap. Eg.
Partition Use Size
1 / 512MB
2 swap 1024M
3 /usr 2048M
4 /space Rest of disk
Unless you anticipate 100's of MB of log files every say you'll be fine with that. (And if you do, then put /var on its own partition, as big as you anticipate it being - 4GB is about right for some of the mail servers I've built like this, but only you know what the expected use of the machine is) I have several machines built just like this in SMEs and they work really well with both Samba and NFS exports of the filesystem.
Remember to connect your drives up with 2 x 80-pin cables to take full advantage of modern DMA - it might also be worth while compiling a custom kernel too with the right drivers for the motherboard hardware installed, then you shouldn't need hdparm at boot time.
You might also want to look at a journalling filesystem too. I've only recently started to use XFS and so-far it's saved me one hour-long FSCK which is a down-side of ext2 and large partitions )-:
Gordon
Quoted 6 lines · Gordon Henderson
Quoted 5 lines
I am not RAID expert but I really don't see the benefits of including the OS in the RAID array as if the primary HD failed, the system won't be
able to boot anyway. Am I right ?
Quoted 7 lines
Not neccessarily. Modern motherboards will boot of either on-board controller, so if the primary failed, then the master drive on the 2nd controller ought to be able to boot. It's worth checking your motherboard though. All the systems I've built in the past 2-3 years like this have had this ability. You may need to physically unplug the failed drive though (and reboot) if it fails in a way that make it look like it's still active.
This is where having hardware RAID is a definate advantage over software RAID as you won't have to intervene if one of your drives has half-way failed and the primary is detected but you can't actually read from it. Now that you can pick up 3ware 6xxx cards for $60-70, you can't really complain about the price, either:
http://www.weirdstuff.com/commerce/catalog/spcategory.jsp?category_id=1267&czuid=1058030005578
-Dave
Quoted 7 lines
Quoted 7 lines
Not neccessarily. Modern motherboards will boot of either on-board controller, so if the primary failed, then the master drive on the 2nd controller ought to be able to boot. It's worth checking your motherboard though. All the systems I've built in the past 2-3 years like this have had this ability. You may need to physically unplug the failed drive though (and reboot) if it fails in a way that make it look like it's still active.
You also need to install GRUB (od lilo) on both disks, as I understand. Reallu I never understood how to do that from living hard disk, so I normally need to install GRUN from floppy the first time it starts.
I normally do the following from a CD that I use to make istallations from
grub --batch <<EOT
device (hd0) $DEVICE1
root (hd0,0)
setup --prefix=/grub (hd0,0)
quit
EOT
grub --batch <<EOT
device (hd1) $DEVICE2
root (hd1,0)
setup --prefix=/grub (hd1,0)
quit
EOT
but this often fails installing correctly. If I start from a floppy in which I have:
title Install GRUB into (hd0,0) the first disk
root (hd0,0)
setup (hd0)
title Install GRUB into (hd1,0) the second disk
root (hd1,0)
setup (hd1)
It never fails. Hany clues?
Thanks
sandro
*:-)
Signature · 3 lines
Sandro Dentella *:-) e-mail: [email protected] http://www.tksql.org TkSQL Home page - My GPL work
Quoted 4 lines · Sandro Dentella
You also need to install GRUB (od lilo) on both disks, as I understand. Reallu I never understood how to do that from living hard disk, so I normally need to install GRUN from floppy the first time it starts.
I've not used GRUB.. Stuck with Lilo..
With a new Lilo, (2.22)
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-4.html#ss4.11
and the magic lilo runes you need are:
boot=/dev/md0
root=/dev/md0
raid-extra-boot=/dev/hda,/dev/hdc
along with everything else.
Gordon