I have ubuntu server 10.04 installed on a Raid10 array (MD) using 4 HD drives.
As it is known, Raid10 is Raid 1 + Raid 0. So, two HD drives are stripped and they are mirrored (or the other way around).
Is there an easy way to figure out which two of these four drives are stripped and which ones are mirrored?
Here is the output of: /proc/mdstat
Personalities : [raid10] [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4]
md0 : active raid10 sda1[0] sdb1[1] sdd1[3] sdc1[2]
388992 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md2 : active raid10 sda7[0] sdb7[1] sdd7[3] sdc7[2]
19529600 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md4 : active raid10 sda9[0] sdb9[1] sdd9[3] sdc9[2]
9762688 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md1 : active raid10 sda6[0] sdb6[1] sdd6[3] sdc6[2]
19529600 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md5 : active raid10 sda10[0] sdb10[1] sdd10[3] sdc10[2]
195309440 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md6 : active raid10 sda11[0] sdb11[1] sdd11[3] sdc11[2]
1558599552 blocks 64K chunks 2 near-copies [4/4] [UUUU]
md3 : active raid10 sda8[0] sdb8[1] sdd8[3] sdc8[2]
146483072 blocks 64K chunks 2 near-copies [4/4] [UUUU]
unused devices: <none>
Probably depends on what options are used to make the arary.
Read man md (4). Default is n2 (near). Here a portion of the manual:
Erm...odd question, they're all striped and all mirrored.
Basically you've got two sets of two disks, each set is stripped and the two sets are mirrored, they're active-active, it's not like one set just sits there.
If the problem is actually booting from different drives as one can perhaps determine from your comments to the answer by Chopper3, then the answer has nothing to do with MD but rather on which drive(s) the master boot record is found, no?
To answer the literal question, IIRC mdadm recognizes array members by UUID so it should be safe to switch them around.
I'm not sure myself, I do know that if you boot differently (eg after removing a drive) the letters assigned to the drives get changed. So what was sdb might become sda.
If you have a problem with booting, install grub onto all drives. It won't hurt the raid array as grub sits outside the raid configuration. Grub also doesn't understand raid, which is why you might not be able to boot if drives change. It might appear to be installed on /dev/md0 but that's just the grub files, the MBR isn't mirrored.
There are two different issues here.
--swapping disks:
This will always work since md uses the internal UUIDs numbers to say which disk are part of a given array and not the /dev path or physical paths. So, moving disks from a port to other has no effect given that md can see all the disks it needs. check the output of mdadm --misc --detail for the UUID field. This is considered a feature of md.
--Learning which disks are mirrored and which pairs are concatenated.
Let's say a 1+0 topology, with b,c,d,e disks all same sizes For instance:
the problem we face is how to tell which disks can be removed without failing the volume.