Linux – What are the advantages and disadvantages of constructing an mdam array from whole disks vs. partitions

linuxmdadmraidraid10software-raid

Let's say I've got six identical drives and I'm going to use them all in a RAID10,f2 array constructed using mdadm. I've always put a single partition on each disk and constructed the array from /dev/sd[bcdefg]1 rather than the whole disk. But, I'm wondering if that's the best thing to do with a modern kernel and mdadm.

Best Answer

The way you're doing it (one large partition that you create the mdadm array from) there's no major difference, but since you're effectively using the whole disk anyway I'd do as Antonius Bloch suggested and use the whole disk device rather than creating a partition -- it just seems more correct to me to create your RAID using the full physical device rather than a chunk of it.

If you are creating multiple partitions and setting up mdadm volumes across those you may actually experience a performance decrease (if you split your disks in half and one array is the first half of a set of disks and the other array is the second half your drives will have to seek back and forth when reading/writing on both disks -- head travel time will kill your performance), but the solution there is not to do that :-)