SOLVED mdadm: Cannot get exclusive access to /dev/md127

Rich Emberson emberson.rich at gmail.com
Wed Feb 4 23:46:50 UTC 2015


Thanks for the help!

   cryptsetup luksClose luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9

did the trick.

Steps
Remove entry from /etc/fstab
# vi /etc/fstab

then following sequence of commands:


# lsof +d /raid1/
 <nothing>
# lsof +D /raid1/
 <nothing>
# df
 </raid1 does not show up>
# mount
 </raid1 does not show up>
# cryptsetup luksClose luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9
 <nothing>
# cryptsetup luksClose luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9
  <Device luks-ab8911f9-b3a4-4f33-8b10-7e52c7217ae9 is not active.>
# wipefs -a /dev/md127
 <nothing>
# mdadm -S /dev/md127
 <nothing>
# mdadm --misc --zero-superblock /dev/sdd1
 <nothing>
# mdadm --misc --zero-superblock /dev/sdc1
 <nothing>
# ls /raid1/
 <nothing>
# touch /raid1/foo
 <nothing>
# ls /raid1/
 <foo>
# rm /raid1/foo
# lsof +d /home
 <lots of entries>
# lsof +d /raid1/
 <nothing>
# umount /raid1/
 <nothing>
# umount -f /raid1/
 <nothing>
# /bin/rm -rf /raid1/
 <nothing>
# lsof | grep md127
 <nothing>

Now fdisk, partprobe, mkfs.ext4, fsck, mkdir /mountpoint, mount for each
disk that was part of the raid group.

Again, thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20150204/7b8939e4/attachment-0001.html>


More information about the users mailing list