Problem with automounter
james at jamesh.id.au
Tue Sep 28 02:19:28 UTC 2004
On 28/09/04 02:07, Kevin Krumwiede wrote:
>When I plug in a USB flash drive, it automatically mounts as /media/sda1 and a Nautilus window pops up showing the contents of the drive. Even after closing the window, the drive cannot be unmounted, not even by root; it just says device busy.
Can you use the "unmount" option on the right click context menu for the
drive in Nautilus? This does a few more things compared to the standard
"umount" command does.
A quick summary of the problem is that to monitor for changes to
directories under Linux, you need to have an open file descriptor for
the directory, which makes the volume appear busy. The file manager
will monitor the trash directory on your USB drive in order to correctly
show the empty state of the trash.
When you use Nautilus's unmount option, it will send a signal out before
trying to unmount the volume so that Nautilus (and other interested
apps) can close any monitors on that volume. If they were the only
things keeping the volume busy, this will allow the volume to be closed.
There is work to fix up the file/directory monitoring capabilities in
Linux (the new inotify API), so a future version of Ubuntu should be
able to set up these sort of monitors without holding the device open.
I can't say what version though, since that depends on when the kernel
changes get accepted.
Email: james at jamesh.id.au
More information about the ubuntu-users