0

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.

3
  • I found a lot questions recommending 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.
    – LiveWireBT
    Feb 21, 2015 at 23:38
  • Iotop didn't seem to return anything useful, and restarting didn't help. I finally figured out that ubuntu created a physical volume group when I created my RAID though, and that if I took the PV and made logical volume group and partitioned that, I could mount the LV no problem. Weird, but it seems to work, and I can't see the downside to having an LV anyway.
    – Pangolin
    Feb 23, 2015 at 15:44
  • If that solved your issue, then please post an answer yourself and mark it as accepted.
    – LiveWireBT
    Feb 23, 2015 at 15:53

1 Answer 1

1

I finally figured out that Ubuntu created a physical volume when I created my RAID, and that if I took the PV and made a logical volume and partitioned that, I could mount the LV no problem.

Use pvdisplay to check for the creation of a new physical volume. If the RAID is part of a volume group, create a logical volume using lvcreate -L (size) -n (name) . Format and mount the partition as usual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .