"device or resource busy" on mdadm create

Bug #1030354 reported by Alexandre Martani
This bug affects 6 people
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Dimitri John Ledkov

Bug Description

The issue manifested itself as a random failure during device creation:

$ mdadm --create /dev/md0 --level=0 --chunk 256 --raid-devices=4 /dev/xvdh1 /dev/xvdh2 /dev/xvdh3 /dev/xvdh4
mdadm: Defaulting to version 1.2 metadata
mdadm: ADD_NEW_DISK for /dev/xvdh3 failed: Device or resource busy

The problem can be solved by disabling udev events during device creation to avoid contention on device handles.

$ udevadm control --stop-exec-queue
$ mdadm --create /dev/md0 --run --level=0 --raid-devices=4 ...
$ udevadm control --start-exec-queue

And we now have consistent reliable device creation.

More details: http://dev.bizo.com/2012/07/mdadm-device-or-resource-busy.html
Note: I am not the author of the post, but I experience the same issue, also using instances on Amazon EC2.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mdadm (Ubuntu):
status: New → Confirmed
Changed in mdadm (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers