I have three 1TB drives in a software RAID-5 configuration with LVM running on top of it. Each drive is partitioned into 2 500GB partitions. So as far as mdadm knows, it has 6 devices.

Currently the raid array has 2.5TB of space; I'm assuming one of the 500GB partitions is being used for parity? Or maybe 500GB is being used throughout the array, I'm not exactly sure.

My question is: with this configuration, am I safe if any one of the drives fail? Or, do I need to add a fourth drive with another 500GB partition as a spare? Or do I need to add another 500GB partition from a fourth drive and somehow specify it to be used for parity?


No, you're not safe.

The idea with RAID 5 is to have N+1 disks (providing total storage equivalent to N disks), with enough redundancy to recover if one disk fails. (The parity is actually distributed over all the disks with RAID 5.)

However, by partitioning each of your 3 physical disks into 2 partitions, you've set up 5+1 500 GB partitions (providing 5*500 GB space), with protection if one partition fails. However if one drive fails completely, you will lose the two partitions that are on it, and you don't have enough redundancy to recover from that.

The usual trick with RAID 5 is to leave your physical devices unpartitioned (or with only one partition each), create the RAID array, and then partition the resulting device if necessary.

Even if you add another 500 GB partition, you still won't be safe if you still use RAID 5, because the extra partition won't add more redundancy, only more capacity. You would have to switch to something like RAID 6, which provides protection against losing two drives.

  • 1
    The reason I partitioned it was because if for example I bought a 1.5TB drive, I could just make 3 partitions, but I definitely understand now. mdadm just treats partitions as separate devices. Thanks again!
    – Nalandial
    May 8 '09 at 4:21
  • 1
    Not to mention, you haven't done performance any favors by treating partitions like spindles.
    – kmarsh
    Sep 29 '09 at 12:02

It is totally nonsense to use two partitions (located on one physical device) in a RAID-array.

My hint:
repartition your drives to one big partition and create a RAID-5 on them (gives you 2TB storage). Add a hot-standby-disc.

Or use RAID-6 (and use four discs).

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.