mdadm: Cannot get exclusive access to /dev/md127

Chris Murphy lists at colorremedies.com
Mon Feb 2 04:19:14 UTC 2015


What do you get for:

dmsetup ls
cryptsetup status

I see this:

> /dev/mapper/luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9 /raid1

This suggests an encrypted device mapper device created from the raid1
device, and it's active. So that has to be closed, or wipefs before
you can stop the raid and then wipe the raid, i.e. you need to tear it
down in the reverse order it was created.

You can try this: DOUBLE CHECK DEVICE VALUES
wipefs --backup -a /dev/md127
mdadm -S /dev/md127
wipefs --backup -a /dev/sd[cd]1

That will backup the luks signature, then wipe it, stop the array,
then backup and wipe the mdadm superblock signature. That ought to fix
the problem unless there's also LVM stuff going on here too.

The --backup isn't strictly necessary but will write out a file and
instructions on how to restore what it wipes in case you get the
command wrong and wipe the wrong device.



-- 
Chris Murphy


More information about the users mailing list