Linux – Mixing RAID0 and RAID1 on the same set of drives

linuxraid0raid1software-raid

I am soon installing a new pair of drives in one of our machines that exists as a VMWare host box (running VMWare Server at the moment). They are going to be used as a RAID0 array for a couple of specific VMs that will impose a high I/O load when they are actively in use. The machine hosts a number of reasonably large VMs that are used for testing purposes.

As there is little point (cost wise) getting drives smaller than 500G the resulting array would be 1000G in size which it far more than is needed for this purpose, so I am considering using a chunk of the disks as a RAID1 array for storing VM backups and reference copies (freeing some space on the existing RAID1 array).

Would there be any harm in:

  1. splitting the drives into, say, 5 partitions
  2. setting one pair of partitions as the initial RAID0 array
  3. creating an LVM group using this new physical volume
  4. setting one pair of partitions as the initial RAID1 array
  5. creating an LVM group using this new physical volume
  6. when either volume group needs to expand
    1. creating a new R0/R1 array in a free partition pair
    2. expanding the relevant LVM group to include this new physical volume

I suspect that all of the above will work perfectly fine, but I was wondering if there are any issues that I'm not aware of. For instance, would splitting the drive into multiple arrays affect the kernel's ability to cache I/O effectively at all?

I have considered instead rebuilding the machine with single RAID10 array over all the drives it will end up with, but taking the machine offline for as long as that will take is not an option and it would not allow the same separation of I/O load that having separate arrays does.

Best Answer

I see no problem in doing this. It's cost-effective and it solves the issues you're having, as long as the RAID1 I/O load is only in effect during controlled maintenance windows.

However, a big RAID1 might provide you with a simpler and more efficient setup, depending on the type of load.