• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Raid 5 in Linux

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

jreinsma

Member
Joined
Jul 14, 2002
Is it possible to install linux on a software raid 5 array. If it is, what distribution would this be easiest to set this up on. Otherwise I will do a hardware raid 1 between two drives then a raid 5 array. Or maybe a CD based distrobution with raid 5 drives. I am looking for insight. Also how fast of a cpu should I be running for up to 10 drives in a raid 5 array. I will mainly be placing my video work that I do on my main system on this server for later access.
 
As it just so happens I just finished setting up a software RAID 5 on my server. Unfortunately you cannot boot from a RAID 5 array yet. As far as CPU is concerned I have a 6 disc array running on an Athlon XP 1800 @1.53GHz and moving files across the network to the array on 10/100Mb is using ~1% of the CPU power. For my setup I'm using a standard 20GB drive that holds the Linux install and the RAID 5 is used as a storage array at /mnt/raid. If you're not afraid of the command line I'd recommend gentoo as the distribution since it's so well documented and the forums are incredibly helpful. Here is a guide to setting up whatever RAID array you want under Gentoo but it should be applicable to any other distro aside from the actual OS installation parts.
http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
I would also highly recommend using mdadm as opposed to the raidtools package to create and manage the array. It's a HELL of alot simpler and just as powerful.
 
I can second mdadm. I have a Debain server running RAID1 and it was ubereasy to configure, and with mdadm i can query the array at any time i want and find the status of it. Re-installing and initiallizing drives after they have failed is super easy too, mdadm -a /dev/(dev name)
 
If you only want to use raid hdds, you can partition your drives with enough space for a system capable of mounting the array, and the same amount for swap space on all the others. The nice thing is that swap space is automatically striped in such situations, provided all swap partitions have the same priority, but you obviously wouldn't be able to lose any single drive gracefully. Another possible solution would be do the root fs raid1 across all drives, which a standard bootloader could deal with.
My fileserver boots from a 10G hdd, about 3.0 GB of which are used by the root and /usr partitions.

Sadly, I can confirm that Linux's software RAID5 will survive a single drive failure well. With the stupid thing I did, I'm amazed that only one drive died. I do, however, have another solid reason to keep the fileserver safely in a closet. ;)
 
Thanks for the help. I will probabily be using debian. I will look at mdadm. Hopefully that is what I need.
 
Definately check out EVMS, it will give you more options, plus has things such as bad sector mapping incase you are using old harddrives or harddrives with a few bad sectors. It may require some kernel patches etc, if you want a casual raid, mdadm will do fine. EVMS is much more robust though.
 
Back