Re: Some way of telling which block devices are in use (and how)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 29, 2012 at 01:18:30PM -0700, Greg KH wrote:
> Don't we already have a way to do all of this through sysfs today?  How
> does gnome/kde handle this when you try to eject a device with an active
> mount that is busy?  It pops up a dialog telling you why this can't be
> ejected, and which device it is.  I think everything you want is already
> there, if not, perhaps dm just needs to add a few more sysfs links to
> tie it all together.

I'm pretty sure GNOME/KDE is just checking /proc/mounts.  Which won't
help if someone is playing games with mount namespaces; the file
system might not be mounted in the namespace where the sysadmin is
trying to do the umount, so the sysadmin will be clueless as to why
they can't unmount the block device.  (And even if they know that it
has been mounted, there's no way to enumerate or name the mount
namespaces, so all the sysadmin can do is to check /proc/$pid/mounts
for every single pid currently running on the system, which is both
painful and something you can't do in a race-free manner.  Fun, fun,
fun....)

And then there are also all of the other ways which the block device
might be busy.  What GNOME/KDE do may often good enough such that it
works most of the time, but there are cases such as

	https://bugs.launchpad.net/bugs/711799

where it's not so obvious why the block device is busy, and it would
be nice if there's an easy way to definitively tell *why* the block
device is busy.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux