GNOME Bugzilla – Bug 115211
Monitoring of .Trash file prevents umount of usb mass storage device
Last modified: 2004-12-22 21:47:04 UTC
Description of Problem: On a Red Hat 9.0 system, interaction between Nautilus creating a .Trash file on a USB device and sgi-fam monitoring the heck out of it prevents umount-ing the device. Steps to reproduce the problem: 1. Automounted a Casio camera to download some pictures. (I use the the mass-storage driver, not gphoto, with this camera.) 2. Deleted a file on the camera. 3. Attempted a umount of the camera (/auto/camera is dev/sda1). Actual Results: "Device Busy" error. Expected Results: No error :) How often does this happen? Can reproduce it every time. Doesn't happen if files are only copied from or to the camera. Only if a deletion is done. Additional Information: I think the file deletion caused Nautilus to create a .Trash file on the camera. Then, sgi-fam sits on the file causing any attempt to umount the camera to result in a "device busy" error. (lsof /dev/sda1 showed that fam was hogging the mountpoint.) Workaround was to restart sgi-fam. Then the drive could be umount-ed. Not sure about the Nautilus-fam interaction but an option in Nautilus to either not write files to certain types of drives or not to sic fam on them would keep this from happening. Google shows a lot of instances of fam camping on drives like this. Fam doesn't seem to have an option to help with this, either.
Deleting the .Trash file did not un-busy the mount.
I would like to confirm that I am getting the same type of umount problems with a USB memory key. I believe the problem has to do with Nautilus interaction with fam when monitoring .Trash files. I am on Red Hat 9 My /etc/fstab/ has: /dev/sda1 /mnt/diskonkey vfat noauto,owner,user 0 0 Version: $ rpm -q nautilus nautilus-2.2.1-5 -------------------------------------------------------------------- Here is an example of how a .Trash directory starts causing problems: Normally I can mount and umount with no problems: $ mount /mnt/diskonkey $ umount /mnt/diskonkey I can even browse with Nautilus: $ mount /mnt/diskonkey [Browse around with Nautilus] [Create files with Nautilus] [Close Nautilus] $ umount /mnt/diskonkey So far, all is good. HOWEVER, if I cause a .Trash-<username> directory to be created on the memory key by deleting a file using Nautilus (even though I empty the trash), then umount will no longer work: $ mount /mnt/diskonkey $ find /mnt/diskonkey /mnt/diskonkey /mnt/diskonkey/foo.txt [Delete /mnt/diskonkey/foo.txt with Nautilus.] $ find /mnt/diskonkey/.Trash-jkowing /mnt/diskonkey /mnt/diskonkey/.Trash-jkowing /mnt/diskonkey/.Trash-jkowing/foo.txt [Empty trash] [Close Nautilus] $ find /mnt/diskonkey /mnt/diskonkey /mnt/diskonkey/.Trash-jkowing find: /mnt/diskonkey/.Trash-jkowing: Stale NFS file handle *** [Note the Stale NFS file handle error above] *** $ umount /mnt/diskonkey umount: /mnt/diskonkey: device is busy -------------------------------------------------------------------- I can get the command line umount to work again, but only by first deleting the /mnt/diskonkey/.Trash-jkowing directory and unmounting by right clicking on the desktop diskonkey icon and selecting "unmount volume". If I don't remove the .Trash-jkowing directory (and unmount it using a gui), then future umount commands also fail with a "device is busy" error. Finally, by runing fam with the debugging flag: # fam -d I can see it looking at that evil .Trash directory. I will be glad to clarify any symptoms. Thanks.
This is still a problem, and fairly major.
Upping priority.
I have the same problem unmounting any device (removable media like USB memory). Only restarting fam (/etc/init.d/fam restart) Nautilus let me unmount the volume. I use Nautilus 2.4.2 and FAM 2.7.0 on Debian sid.
This is a dup of bug 86114 which is a dup of 84919 which is a dup of 102760 which is supposed to be fixed with redhat's patched fam and GNOME >= 2.6 :) *** This bug has been marked as a duplicate of 102760 ***