Device already mounted or mountpoint busy take 2
Device already mounted or mountpoint busy, take 2
See my first article about fighting this mis-leading message. Clearly, Linux's use of the "device already mounted or mountpoint busy" string is woefully overloaded.
Here's the rundown:
- This time around, I'm on CentOS 7.1.1503
- I had a 5-disk software RAID-6 device, md125, mounted to /mnt/share. This was to be moved to /mnt/oldshare, and replaced with a new device...
- The new device is a 2-disk software RAID-1 device, md124. This device was to become the new /mnt/share.
- md125 (aka oldshare) is ext4, and md124 is xfs.
I un-mounted md125 on /mnt/share, updated /etc/fstab, and mounted both devices where I wanted them (md125 on oldshare, and md124 on share).
No problems, great! But then I thought, actually, oldshare should probably be mounted read-only, just to prevent any accidental writes to it. No problem: unmount /mnt/oldshare, add the "ro" flag to the mount options in /etc/fstab, and mount... or not:
# mount -o ro /mnt/oldshare/ mount: /dev/md125 is already mounted or /mnt/oldshare busy
Hrm, what? I just unmounted, how could it possibly be mounted or busy?
I tried all the ususal suspects: lsof, fuser, mount, /proc/mounts, /etc/mtab... nope, all those are clean. Next I ran through the useful list of suggestions on this helpful ServerFault post, CentOS thinks Disk is busy, can't mount or fsck.
First up, blkid shows the device as in-use:
# blkid -c /dev/null -o list device fs_type label mount point UUID ------------------------------------------------------------------------------ /dev/md125 ext4 (in use) 2d72dbd0-70c4-4006-bb17-771c249f531d
OK, it's in use, but by what?
The dmsetup table command doesn't show any references to the device in question, only the LVM partitions used for my system's root partition. Unlike the ServerFault post above, the multipath command did not give me the answer:
# multipath -ll Dec 16 09:21:38 | DM multipath kernel driver not loaded Dec 16 09:21:38 | /etc/multipath.conf does not exist, blacklisting all devices. Dec 16 09:21:38 | A default multipath.conf file is located at Dec 16 09:21:38 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf Dec 16 09:21:38 | You can run /sbin/mpathconf to create or modify /etc/multipath.conf Dec 16 09:21:38 | DM multipath kernel driver not loaded
Ugh, so now what? Well, on a whim, I tried to use the remount option with the mount command:
# mount -o remount,ro /mnt/oldshare/
And that was it! After that, I could unmount, then mount read-only using the /etc/fstab's "ro" option.