RAID – mdadm RAIDs of Partitions or Partitions of RAID

mdadmraidraid1software-raid

If using entire drives for an mdadm RAID which will be the boot device as well, is it more correct / standard to:

1) Configure the RAID out of partitions that encompass the whole drive (like /dev/sda1 + /dev/sdb1) and then partition the resulting single md device into the various partitions.

OR

2) Create all the partitions on each drive in their desired sizes and then create RAIDs of those (e.g. sda1 + sdb1, sda2 + sdb2, sda3 + sdb3, etc.)

I'm thinking the benefit to #1 would be ease of drive replacement, and also I was told that #1 allows mdadm to parallelize reads across the various member drives more effectively.

Is there some authoritative link which talks about one as being the preferred way to go?

Best Answer

There is a distinct difference in using disk MD (sda + sdb) or partition MD (sda1 + sdb1), that you seem to lump together. Booting from a whole disk MD is not possible. Therefore, I tend to make partioned MD RAID on the disk/array I boot from.

If I have secondary disks that form arrays (like sdc + sdd), I tend to make a whole device MD, make it a LVM volume group and add logical volumes to it. This makes replacing disks a bit easier, because you can just hotremove and hotadd the new disk and you're done, as opposed to doing it for each partition. Additonally, if your replacement disk is bigger, it's easier to add that space to the array (although not impossible when using partitions).