Linux RAID

I have had some experience with hardware RAID using 3ware (now LSI) RAID controllers. Linux also allows software RAID, which is quite mature and capable.

I have set up RAID arrays using the Fedora 16 install DVD. The trick is to first create raid partitions, then create a raid device that combines the partitions. Many questions arise about how to partition the drives involved. I partitioned outside of RAID, not using the entire disk - this allowed me to have swap outside of RAID, which seemed like a good thing. I also put my /boot partition outside of RAID, which may or may not have been a good idea.

One good idea is to make the raid partitions smaller by some amount (maybe 100M) than the full size of the disk. This is in case a replacement disk (perhaps from the same manufacturer) doesn't have quite as many blocks as the disk it is replacing.

A quick way to check the status of a software raid setup in a running system is:

cat /proc/mdstat

The mdadm command does everything from the command line and has a good man page.
Here are some examples:

mdadm --manage /dev/md0 --fail /dev/sda9
mdadm --manage /dev/md0 --remove /dev/sda9
mdadm --manage /dev/md0 --add /dev/sda9

sources of information:

A recommendation is to run smartd on all drives to be notified of drive failures.
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org