Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 5 2TB WD Green (WD20EARX) drives that I eventually want to put into software RAID 5. I can't seem to find a complete guide on getting these drives prepared for use with Ubuntu (mdadm) that includes aligning them properly and such (advanced format drives).

After multiple iterations of trying to get these to work I can't figure out what to do.

Do I need to choose GPT or msdos as the partition label? Also, before I put these into a raid array, should I format them with a particular file system?

It seems that whenever I try to build the RAID 5 array with madam I am getting horribly slow build speed. I have tried setting the max and min speed limit values, but am not seeing a performance boost.

I really would appreciate any help you can give as I am finding no documentation that seems to incorporate the RAID 5 setup after the alignment configuration.

I am using Ubuntu Server 12.04 64bit with no GUI.

Thank you so much!

share|improve this question
For Linux, both MSDOS and GPT partlabels should work, although GPT is recommended for all new stuff. (But isn't partitioning normally done after configuring RAID?) – grawity May 16 '12 at 20:31
up vote 1 down vote accepted

I'm not entirely sure what exactly you're referring to with alignment-- but I'm running the exact same setup on my home media server. (Can you link the guide?)

I would go with a GPT partition label, and create a partition that takes up all available space (minus 10-100MB or so, so that the drive can be replaced with a drive from a different manufacturer which may not have exactly the same amount of space). You don't need to pre-format the partitions, all of that happens after the raid array is created. Just make sure all of the partitions are exactly the same size. You can skip the partitioning and build the raid directly on the devices (/dev/sdb, /dev/sdc, etc.), but this actually causes weird issues when OSes try to read the partition table and find part of a partition table on each of the drives-- Something I did, but would not do again if I had the space or time to rebuild my array from scratch.

Next, you create the RAID array (mdadm --create -n 5 -l 5 /dev/md0 /dev/sdb1 /dev/....)

And at this point you should have your raid device at /dev/md0. It will start syncing up the parity information, and /dev/md0 should be treated like a brand new harddrive. You can partition it, you can put a filesystem on the device directly or on a partition on the device. You can set up LVM and use that to manage dividing up the space among multiple filesystems.

I'm not entirely sure on speed-- my array takes more than a day to fully resync, but once it's done, it's blazing fast (about 360MB/s sequential reads, which is what I'd expect from 4 60MB/s drives and a 120MB/s drive; It's more than capable of saturating a gigabit network link, which is all I really need it to do as a fileserver). A resync operation will run at the write speed of the slowest drive, more or less.

Also, I'm presuming that you bought all 5 drives at once-- this leads to a very high likelihood of all the drives coming from the same palate of drives, which will often share any manufacturing defects if there is one. While the chances of drives failing might be manageable, keep in mind that if one of your drives fails, there is a very high chance that a second or third drive will fail very soon after-- the stress of rebuilding the array after the first failure usually doesn't help mitigate this issue. Raid 5 is very unforgiving about double-failures, so make sure to keep a backup of anything you can't stand to lose.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .