How do I configure a new mdadm
software RAID-10 to use a specific order for its drive mirroring?
Say I have 4 hard drives: A, B, C, and D.
For my own reliability and performance reasons, I want drive A to be a mirror of drive C, and drive B to be a mirror of drive D. Then each mirror striped, like this
|----- RAID-0 ----- |
RAID-1 RAID-1
|---------| |---------|
| drive A | | drive B |
| drive C | | drive D |
|---------| |---------|
I don't see a way to configure this. Not sure about the drive order this command produces:
mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[a-d]1
Is there a way to manually order the drives in a mdadm
array?
If not, is there a way to check the order after the array is created so I could physically move the drives into the configuration I want? (I think I can create the array members using /dev/disk/by-id/ata*
so I can physically move them without worrying about /dev/sd*
re-ordering.)
Bonus question. I also will want a hot spare, drive E, to be available to either mirror set.
Think I figured out my own answer. Set up two RAID-1s first, then RAID-0 them together.
Created two RAID-1 volumes
(I used drive ID's instead of
/dev/sda,/dev/sdb,...
to ensure an exact match of the drive I want)Then, created RAID-0 with the two RAID-1 arrays
I will update this with results in a couple days, after the arrays sync and after I add a hot-spare drive, and I have time to test.