1

I'm trying to configure RAID5. I know this question has been asked before but I have been stuck on this for 3 days.

Input:

sudo mdadm --create /dev/mdo --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1

Output:

mdadm: cannot open /dev/sdb1: device or resouce busy

Input:

umount /dev/sdb1

Output:

umount: /dev/sdb1 is not mounted

Input:

lsof /dev/sdb1

No output... nothing displays.

Rebooted machine uncountable times.

Here is a screenshot with my drives:

View of disk partitions

I have also reinstalled Ubuntu server twice in the past 48 hours.

  • I've used both /dev/sdb & /dev/sdb1 although I didn't explicitly write that out here. But you are correct. – FishCommander Mar 08 '16 at 06:19
  • I've changed the text above, however that does not get me any closer to resolving the problem. – FishCommander Mar 08 '16 at 07:50
  • Can you create other raid levels? On a German Ubuntu page I found the info that this error might indicate that there has existed a Raid configuration before that must be dissolved first. Could that be it? – HATEthePLOT Mar 08 '16 at 08:04
  • @HATEthePLOT I am not able to create other raid levels. I just tried a RAID1 using sdb1 &sdc1. That didn't work same error. Tried using sdc1 & sdd1. Again same error "Device or resource busy". It is possible that the other RAID configuration needs to be dissolved. I am new to Linux, been using it for about 7 days. Beyond deleting the partition I don't know how else to do that (not seeing things on google that are helping me) – FishCommander Mar 08 '16 at 08:10
  • @techraf I did not try that. I did try it just now. It seems to have fixed the issue. I used the ['code']cat /proc/mdstat['code'] function and noticed an "md127" I don't recall ever making this. Maybe left over on the disks but it was referencing my sda1, etc... partitions. Anyway using ['code']mdadm --manage /dev/md127 --stop['code'] I was able to follow the blog instructions. Thanks for the link. Issue resolved. – FishCommander Mar 08 '16 at 08:27

1 Answers1

1

According to this blog you should use the following procedure to avoid contention on device handles:

$ sudo udevadm control --stop-exec-queue
$ sudo mdadm --create /dev/mdo --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
$ sudo udevadm control --start-exec-queue
techraf
  • 3,306
  • 10
  • 26
  • 37
  • 1
    I was able to use the blog to resolve. Thanks. I also found using `cat /proc/mdstat` That there was an "md127" that I did not create (left over from a former RAID array is my guess) After stopping it I was able to use your answer `mdadm --manage /dev/md127 --stop` – FishCommander Mar 08 '16 at 08:34