GNOME Bugzilla – Bug 84919
Unmount volume fails
Last modified: 2004-12-22 21:47:04 UTC
Package: nautilus Severity: normal Version: 2.0.0 Synopsis: Unmount volume fails Bugzilla-Product: nautilus Bugzilla-Component: general Description: Description of Problem: Unmount volume fails Steps to reproduce the problem: 1. Mount a cd 2. Right click on icon and select unmount volume 3. Actual Results: Nothing happens Expected Results: The volume should be unmounted How often does this happen? Every time Additional Information: I have an NFS mounted home directory, it shouldn't have anything to do with it, I only mention it because I know that there have been one or to other issues like this that have been effected by NFS. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-06-11 15:24 ------- Reassigning to the default owner of the component, nautilus-maint@bugzilla.gnome.org.
If you do 'killall fam' as root, does it work, Steve? If so, then this is bug 69706 rearing its head again.
- Mounted the CD - Tried to unmount, failed as expected - Did 'killall fam' as root (sudo'd) - Tried to unmount the CD, failed - Checked to see that no fam processes where running - Tried to unmount the CD, failed - Stopped xinetd 'cos I remembered that fam runs through it - Tried to unmount the CD, failed This would suggest that it's a different problem?
Does umount'ing from the command line work (as root or otherwise)? If so, please run the following while the cdrom is mounted: lsof | grep /dev/<cdrom> Where <cdrom> is the name of your cdrom device (probably hdc if its not a SCSI). Does this output anything? If so, can you try killing whichever application has the device open, and trying the unmount through nautilus again?
Reassigning this one to dave. There are two problems here: 1) No error message anymore if you can't unmount. 2) probably has an open monitor to FAM, as killing fam (/here/) allows me to unmount.
Nautilus shouldn't be monitoring read-only volumes. There are checks in nautilus-monitor.c to avoid this. So unless the bug is there, or in the volume monitor stuff, something else must be telling fam to watch the cdrom.
Maybe I should take this one, as I know the nautilus/vfs monitor code pretty well?
Alex: sure, go for it. Be aware that it isn't just a problem for RO FSs- I'm seeing it on NFS too.
fwiw, I can't reproduce this with either cds or nfs. However, selecting "Unmount Volume" on nfs fails silently (except for a g_warning) for me. Attaching a patch that fixes that problem.
Created attachment 9334 [details] [review] save the device number before returning on nfs and smb.
Steve, can you unmount the volume by right-clicking elsewhere on the desktop, and unselecting the filesystem in question from the Disks menu? Otherwise, sounds like Dave's patch fixes Steve's problem.
My patch doesn't affect cds, only smb and nfs mounts.
*** Bug 81079 has been marked as a duplicate of this bug. ***
So, looks like if I select "Unmount Volume" by right clicking the *desktop icon* of the mount, it does not pop up the dialog saying the device is busy. If I just select it again from the "Disks" menu, then I get the "busy" dialog. There seem to be 2 things that cause issues: + FAM keeping an open monitoring "session" on the trash folder of the volume. + Nautilus finishing off a batch job to create thumbnails of your bazillion holiday photos on the removable disk. This is sometimes very annoying and it takes quite long to finish. Now, I think Nautilus should drop dead all the activity it is *itself* doing on a removable device / mounted volume if the user chooses to umount it. Same with FAM. The related problem is, many times one has a shell open. And I dont know what we can do about that?
Don't you just love the way Bugzilla makes it possible for me to get into a mid-air-collision with myself :-) And then you get the same comment twice.. Oh well.
the attached patch has been committed. I'm removing the PATCH keyword since it isn't really relevant to the bug at hand.
*** Bug 86114 has been marked as a duplicate of this bug. ***
There are other useful comments in bug 86114.
It works fine for me on Solaris
My problem seems related, so I am putting it here. I have a usb flash drive. Here is my /etc/fstab entry: /dev/sda /mnt/trek vfat user,sync,noauto,umask=0077 0 0 There are two interesting scenarios which occur (neither correct): 1. Mount the volume using Disks from desktop menu. Double click the icon to open a nautilus window. Try to unmount it-- device busy. Close that nautilus window, try to unmount it-- it unmounts. 2. have a symlink from somewhere in your home directory to somewhere on the device (eg 'ln -sf /mnt/trek/.gnupg /home/james/.gnupg). Mount the drive via desktop menu. Cannot unmount it until you logout-- even with 'killall -9 fam'. Similar behaviour happens if I mount the device into the home directory. Eg mount -t vfat /dev/sda /home/james/.gnupg Hopefully this will help with some of this. Using a usb drive for gpg keys is a really neat application-- and I REALLY like the new nautilus (and gnome2 for that matter). gnome2 from debian sid (nautilus 2.0.0) i386 Jamie Strandboge
I wanted to point out the the usbdrive uses a vfat filesystem, and I just learned of someone else having a problem with nautilus/fam and a vfat partition (ie on a hard drive).
I'm the someone mentioned in the previous comment. The vfat partition gets mounted (by regular user) by right-clicking the desktop, and then Disks > windows. The fstab entry is something like: /dev/hda1 /mnt/windows vfat user,noauto,rw 0 0 Fam keeps the mounted vfat partition busy, preventing it from being unmounted. I have to kill fam or nautilus (either as regular user), and then I can unmount.
The problem still exists in the most recent (Ximian) snapshot of Nautilus. I also see it with a vfat partition, but I'm not claiming that that is the cause of it. My problems are caused by Nautilus without me even opening a Nautilus window for the disk. Steps: (1) I put an MSDOS floppy in the drive (2) I type "mount /mnt/floppy". Nautilus starts frantically accessing the floppy, even though there are about 7 files on there, none of which require thumbnails to be generated or anything. The activity doesn't die down for several seconds. (3) I make changes to the disk contents. (4) I type "umount /mnt/floppy". The following error is reported in the terminal: "umount: /mnt/floppy: device is busy". Previous to trying to unmount the disk, all disk activity had died down, so I thought Nautilus had finished whatever it was doing. (5) As root, typing "fuser -uv /mnt/floppy" returns: USER PID ACCESS COMMAND /mnt/floppy root kernel mount /mnt/floppy (6) I cannot unmount the disk until I type "killall nautilus". Then the unmount works fine. Given that Nautilus is not an suid root program (or I certainly hope it's not!), I'm guessing that the process that has the floppy mounted is in fact fam -- is this a correct assumption? The fact the floppy won't unmount is a really annoying problem, but the disk activity generated in (2) itself is a very worrying problem. Wasn't all the unnecessary disk activity eliminated when Alan Cox ran his syscall trace around version 1? In the case of a floppy, it renders the floppy almost unuseable for a substantial period of time, because it is thrashing.
alexl committed a fix for trash handling that should probably fix this. Can you try with the latest snaps and let us know?
Is this bug still valid, or is fixed??
No feedback. Closing.
Please re-open. This appears for any removable drive with the following versions of nautilus and fam: $ cat /etc/fedora-release Fedora Core release 1 (Yarrow) $ rpm -q nautilus fam nautilus-2.4.0-7 fam-2.6.8-12 After inserting and browsing a CDROM, I get the following: $ eject umount: /mnt/cdrom: device is busy eject: unmount of `/dev/cdrom' failed $ sudo lsof /mnt/cdrom COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME fam 5310 halley 22r DIR 11,0 2048 60006 /mnt/cdrom/CREDATIV fam 5310 halley 24r DIR 11,0 4096 59392 /mnt/cdrom $ sudo killall -9 fam $ eject [success] The system behaves similarly on two different motherboards, with CDROM, DVD-RW, and CompactFlash USB storage devices, all of which are prevented from ejection and unmounting.
*** This bug has been marked as a duplicate of 102760 ***