I currently have two disk of the same size (4TB each) in raid1.

I'm wondering if it's now possible to add an additional disk of size 8TB and have it as raid 1 with the other two disks acting as raid 0? Is this type of configuration supported by mdadm? So it would essentially be an additional layer - a raid on top of another raid.

In other words:

Raid 1 between: (8TB disk) + (raid 0 between: 2x 4TB)
Total usable space: 8TB
  • Seems I might have difficulty converting the two drives from raid1 to raid0 according to: serverfault.com/questions/737787/… Apr 27 '20 at 10:47
  • Does this change have to happen online or can you unmount the volume for it? Apr 27 '20 at 11:17
  • I can unmount the volume yes. I have physical access to everything. Apr 27 '20 at 11:18
  • Seems it's a thing indeed! en.wikipedia.org/wiki/Nested_RAID_levels Apr 27 '20 at 12:58
  • Depending on the usage profile it may make more sense to combine the two small disks to a JBOD (mdadm type linear) than to a RAID0. The RAID offers higher bandwidth for long reads/writes but hits you with the longer access time of both disks each time. Apr 27 '20 at 13:05

You may have to fiddle with the exact sizes of these arrays to get things to work out properly, but here's the basic approach:

  1. Create a 2-disk RAID 1 using the 8TB drive and no second disk for the time being. The array will come up degraded with a missing drive.
  2. Copy the data from your 4TB RAID 1 over there.
  3. Destroy the existing 4TB RAID 1.
  4. Create a RAID 0 with the two 4TB drives.
  5. Add the RAID 0 array as the 2nd drive in the 8TB RAID 1.
  • For 5 - what would the mdadm command be? sudo mdadm --create --verbose /dev/md1 --level=mirror --raid-devices=2 /dev/sdc /dev/md0 ? Where /dev/md0 would refer to the raid0 disks? Apr 27 '20 at 12:55
  • You got it! Specify /dev/md0 as a drive in /dev/md1. Apr 27 '20 at 13:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.