So, I’m currently running two fileservers. One at my house which has a 4×500GB RAID5, a 2×250GB RAID0, and runs a few other things for the local network. Pretty much anything of any relevance gets stuck on the server, the actual computers just get by with whatever minimal hard drive was cheapest. The other I stash at my mom’s for backup purposes, just in case something truly nasty happens that physically takes out my box at home. It was originally set up with a 4×200GB RAID5.
Anyway, other than the individual hardware differences, they’re set up pretty similarly – both run Ubuntu Server 8.04, and both have their RAID arrays managed using the built-in tools in Linux, mdadm and lvm. In fact, the guide I used to set these up is right here. It’s really a simple process – install a bunch of drives, partition them out with the ‘Linux RAID autodetect’ partition type, and use mdadm to group them into arrays of specified levels and sizes. Stick a LVM partition on the resulting md device for convenience’s sake, and then dump an ext3 in that. (In hindsight, the LVM probably wasn’t necessary, but oh well.) Congratulations, your array of inexpensive drives is now redundant and humming away happily. Use BackupPC or similar software to automate the actual backup process, and you’re off.
Of course, you can do this in Windows, even XP with a few hacks but usually Windows Server. You can even do it with nothing but mouseclicks, and it can do RAID5 too. The fun doesn’t show up until you try to expand that array, though. Windows? Can’t do it at all. The only way to grow a RAID5 is to break the array and start from scratch, and I don’t exactly keep a few TB worth of spare drives around to move my data onto every time I have to grow the array.
But if you used Linux and mdadm, it’s really cake. I added another drive (250GB, actually) to the backup server, and after sorting out the annoying mess that is Western Digital’s jumper selection, I was able to do it with these commands:
mdadm --add /dev/md0 /dev/sdf1
mdadm --grow /dev/md0 -n 5
(wait 12 hours)
pvresize /dev/md0
pvdisplay (to get the actual value for the next command)
lvresize /dev/lvm-raid/raid5 +6000
resize2fs /dev/lvm-raid/raid5
Notice how there’s not even a umount or a mount in there. I did go ahead and stop all BackupPC processes and whatnot while I was doing this, but the whole time the array was technically online and accessible. Beautiful stuff.