mdadm - RAIDs of partitions or partitions of RAID?

Solution 1:

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).

Solution 2:

There isn't a set standard (or best practice) that I'm aware of. Different distributions and vendors will have different recommendations for the layout.

For an OS installation I'll typically create two MD devices: one for swap (md0) and one for / (md1). If I had to separate OS data from application data I would assign md1 to LVM and create logical volumes to separate them, rather than create an additional MD device.

It all depends on your needs, what your application or OS vendors will support (if you have any), and your personal preferences.