I had a server with Raid 5, and I wanted to wipe everything and do Raid 10. I deleted the raid 5 as best I could, zeroing superblocks, removing it from fstab, etc. And I created the raid 10. Now, I cannot seem to assemble it:
$ sudo mdadm --assemble --scan --verbose /dev/md127
mdadm: looking for devices for /dev/md127
mdadm: /dev/dm-0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/md/Pangolin:0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdh1 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdh is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdg1 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdg is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdf1 is busy - skipping
mdadm: /dev/sdf is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sde1 is busy - skipping
mdadm: /dev/sde is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdd1 is busy - skipping
mdadm: /dev/sdd is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdc1 is busy - skipping
mdadm: /dev/sdc is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdb1 is busy - skipping
mdadm: /dev/sdb is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sda5 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sda2 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: no RAID superblock on /dev/sda1
mdadm: /dev/sda is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sr0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
I'm a little confused as to the output. Here's the /proc/mdstat
which shows that it's only /dev/sda1-f1
:
$ sudo cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid10 sdf1[4] sde1[3] sdd1[2] sdc1[1] sdb1[0] sdg1[5]
2929890816 blocks super 1.2 256K chunks 2 far-copies [6/6] [UUUUUU]
md0 : inactive sdh[4](S)
976631512 blocks super 1.2
I'm not sure exactly why my drives would show up as busy. I tried mount/umounting both the drives and the RAID /dev/md127
, but they were still coming back as busy. So, I tried seeing if I could find a process, but
$ sudo lsof | grep /dev/
failed to return anything that might point to the cause.
iotop
for investigating which process keeps a drive busy. Example: stackoverflow.com/q/488826/2010467 In some scenarios the only thing you can do is rebooting the machine.