I have a Linux mdadm RAID 10 array comprising of 6 (SATA) disks configured with n2 copies.
While pulling out one disk, another one in another mirror pair failed. Leaving me with:
$ cat /proc/mdstat md2 : active raid10 sdb1 sdd1 sdc1 sdf1 2929412352 blocks 64K chunks 2 near-copies [6/4] [_UUU_U]
I wanted to replace the 5th disk and rebuilt the partition table with:
sfdisk -d /dev/sdf | sfdisk /dev/sde
However, when I add the new disk with
mdadm -a /dev/md1 /dev/sde1, mdadm starts to rebuild RaidDevice 0
$ mdadm -D /dev/md2 ... Number Major Minor RaidDevice State 6 8 66 0 spare rebuilding /dev/sde1 1 8 2 1 active sync /dev/sdb1 2 8 17 2 active sync /dev/sdc1 3 8 33 3 active sync /dev/sdd1 4 0 0 4 removed 5 8 49 5 active sync /dev/sdf1
This is not a major issue and I just need to physically move disk 5 to the disk 1 slot to maintain some sanity when looking at the box.
My question is, is there a way to instruct mdadm to use a new disk to replace a specific RaidDevice? I've trawled the man pages but can't find a suitable option.