I have 3 ssd disks (59 GB) each. I want to use them as sofware raid5 with fedora 15. I read that it is recommended to have /boot on a separate disk. 2 questions:

1) is it possible and advisable to have a 6 GB partition on each disk (and make them as raid 1), for the /boot and /swap partitions? in this case would recovery of the raid1 and raid5 arrays be easy?

2) having /boot and /swap on a separate 4th disk (thus apart from the abovemensioned 3), how would be the recovery procedure if this disk fails?



I would just do /boot as a three way software RAID-1. Sure three way RAID-1 wastes space and increases writes, but /boot is tiny and has close to zero writes so that doesn't in practice matter.

I don't see the issue with having swap as either a separate RAID-5 or else a swap file inside the RAID-5 that you'll be using for your main OS.

As long as you retain redundancy then there is no recovery process to speak of since nothing is lost. Everything carries on working, but slightly slower and with no further redundancy.

To return to a fully redundant configuration you would use mdadm to fail out a disk, physically remove it (while the machine is still running if your chassis/case/caddies support hot swap), physically replace with new disk, repartition new disk the same as one that was removed, use mdadm to add back partitions on the new disk into the arrays. That's it.

A three disk RAID-1 can lose any two disks. A three disk RAID-5 can lose any one disk.

  • ok, i understand the swap story, I didn't realize I could put the /swap inside the raid5 array. Let me get this right: do you mean i should have 3 extra partitions on each ssd to make them as raid1 array? If so, how would the recovery process be if 1 disk failed? first recover /boot and from there recover raid5 array? I would really like a link to a tutorial on recovering failed disk for linux – Hussam Jul 26 '12 at 14:28
  • The problem is that grub doesn't understand software RAID unless it's RAID1, which is simply mirrored data and doesn't look like RAID at all to grub. So you can do that, or put /boot on a separate disk. – Michael Hampton Jul 26 '12 at 16:38
  • @MichaelHampton your statement is somewhat out of date. Recent versions of grub 2 with the correct grub modules configured is able to read RAID and LVM. – Zoredache Jul 26 '12 at 17:09
  • That's good to know. With bootloaders I prefer other people to live on the bleeding edge. :) – Michael Hampton Jul 26 '12 at 17:19
  • @Hussam I have edited my answer to include some notes about how you deal with disk failure. – grifferz Jul 26 '12 at 19:08

If I was partitioning your system I would setup the partitions like so that you used small partition for a RAID1 of boot, and the rest of the space for a big RAID5. Then setup LVM on the RAID5 and create logical volumes for root, swap and any other filesystems you want.

/dev/sda1 1GB RAID1(/dev/md0)
/dev/sda2 *   RAID5(/dev/md5)

/dev/sdb1 1GB RAID1(/dev/md0)
/dev/sdb2 *   RAID5(/dev/md5)

/dev/sdc1 1GB RAID1(/dev/md0)
/dev/sdc2 *   RAID5(/dev/md5)

/dev/md0 ext3 /boot
/dev/md1 lvm
/dev/vg/swap swap
/dev/vg/root /
  • +1 for the clear disk layout – Hussam Jul 26 '12 at 21:54

you need only about 200MB on /boot really, max 500MB if you want to be safe. The point of having a separated /boot is to make it bootable without the need of extra modules, if you make it another RAID array you will defeat this. Just create a small partition for it on one of the disks and format it as ext2 (simpler fs, easier to mount in case of accidents).

As about the swap, it doesn't make much difference where you are going to put it, but it will be faster to use it on an SSD than on a HDD.

  • ok, so i guess you're saying it's better to have /boot on a different disk (preferrably SSD). I'm just worried about this disk failing. Would it be ok to have 2 small ssd's, like each 4GB for /boot and have them in a (software) raid1 array? – Hussam Jul 26 '12 at 13:45
  • Booting for a RAID1 is perfectly fine in every distro I know of simply because grub/lilo doesn't have to know anything about the RAID1 at all. It just looks at the partition as if it is a standard ext3/whatever filesystem. – Zoredache Jul 26 '12 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.