Bug 122472

Summary: unable to eject media
Product: [Fedora] Fedora Reporter: mark <markf78>
Component: nautilusAssignee: Alexander Larsson <alexl>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: dasergatskov, marius.andreiana, markf78, mluntz, walovaton
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-16 06:14:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log after executing Alexander's suggestion in comment #5 none

Description mark 2004-05-04 21:58:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Description of problem:
nautilus reports the following message while ejecting a zip disk from
a firewire drive:

EJECT ERROR
Unable to eject media
eject: unable to eject, last error: Invalid argument

but the disk is ejcted as the message appears.
so i then click OK and everything is fine.

[root@markf78 root]# rpm -q kernel nautilus nautilus-media
kernel-2.6.3-2.1.253.2.1
nautilus-2.6.0-4
nautilus-media-0.8.0-1


Version-Release number of selected component (if applicable):
nautilus-2.6.0-4

How reproducible:
Always

Steps to Reproduce:
1.insert zip disk into firewire zip drive
2.mount disk
3.eject disk
    

Actual Results:  see description

Expected Results:  no error message

Additional info:

Comment 1 Marius Andreiana 2004-10-15 10:02:56 UTC
Might be related to #126441.

Better HAL integration, without fstab, could solve both?

Comment 2 mark 2004-12-06 02:30:13 UTC
this problem still exists in FC3...

Nautilus Unable to unmount the selected volume.
> Show more details.
umount: /media/ieee1394disk: device is busy
umount: /media/ieee1394disk: device is busy

[root@markf78 /]# rpm -q nautilus nautilus-media kernel hal
nautilus-2.8.1-4
nautilus-media-0.8.1-3
kernel-2.6.9-1.667
hal-0.4.2-1.FC3


Comment 3 mark 2004-12-06 02:32:59 UTC
interestingly, typing the following:
[root@markf78 /]# umount -l /media/ieee1394disk

seems to fix the problem so that nautilus' mount/unmount volume
commands will work correctly.

Comment 4 mark 2004-12-06 02:40:21 UTC
however, forgot to the mention that although the disk can be
unmounted/mounted it cannot be ejected (which i guess results from the
lazy unmount)

Comment 5 Alexander Larsson 2005-01-11 14:14:12 UTC
So, what is causing the device to be busy?
Also, what command line is nautilus using to eject? (you can find out
by stracing nautilus with something like "strace -o nautilus.log -f -e
execve nautilus"

Comment 6 Alexander Larsson 2005-01-11 14:43:32 UTC
*** Bug 138759 has been marked as a duplicate of this bug. ***

Comment 7 Dmitri A. Sergatskov 2005-01-11 16:14:08 UTC
Here is an attempt to "eject -v" usb zip-disk as user and then as root:

[dima@localhost ~]$ eject -vvv /media/usbdisk/
eject: device name is `/media/usbdisk'
eject: expanded name is `/media/usbdisk'
eject: `/media/usbdisk' is not mounted
eject: `/dev/sda4' can be mounted at `/media/usbdisk'
eject: `/dev/sda4' is a multipartition device
eject: unable to open `/dev/sda4'
(disk unmounted, but not ejected)

[root@localhost ~]# eject -vvv /media/usbdisk/
eject: device name is `/media/usbdisk'
eject: expanded name is `/media/usbdisk'
eject: `/dev/sda4' is mounted at `/media/usbdisk'
eject: unmounting device `/dev/sda4' from `/media/usbdisk'
eject: `/dev/sda4' is a multipartition device
eject: trying to eject `/dev/sda4' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sda4' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/sda4' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/sda4' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument
(disk ejects)
It works with (ide) cdrom:
[dima@localhost ~]$ eject -vvv /media/cdrecorder/
eject: device name is `/media/cdrecorder'
eject: expanded name is `/media/cdrecorder'
eject: `/dev/hda' is mounted at `/media/cdrecorder'
eject: unmounting device `/dev/hda' from `/media/cdrecorder'
eject: `/dev/hda' is a multipartition device
eject: trying to eject `/dev/hda' using CD-ROM eject command
eject: CD-ROM eject command succeeded


Comment 8 William Lovaton 2005-01-18 04:18:14 UTC
Created attachment 109911 [details]
Log after executing Alexander's suggestion in comment #5

Hi Alexander,  I executed the strace command as you suggested and I got this
log.  It contains the execution of nautilus, the insertion of the CD (and
automounting) and then three attempts of Ejects through the CD icon in the
Computer window, finally killing with Ctrl+C.  This test (as a normal user)
didn't ejected the CD actually.

Aditionally, I executed the same command for eject as root since this is the
only way to get the CD out of the drive:

[root@athlon2000 william]# strace -o eject.log -f -e execve eject /dev/hdc
eject: unable to eject, last error: Invalid argument
[root@athlon2000 william]# cat eject.log
28994 execve("/usr/bin/eject", ["eject", "/dev/hdc"], [/* 37 vars */]) = 0
28995 execve("/bin/umount", ["/bin/umount", "/media/cdrecorder"], [/* 37 vars
*/]) = 0
28994 --- SIGCHLD (Child exited) @ 0 (0) ---


I hope this helps.  Please, take into account that this is based on my comments
in #138759 Comment #2 which have been marked as a duplicate of this bug.

Comment 9 Michael Luntz 2005-02-21 01:20:29 UTC
I am having the same behavior as described in additional comment # 2
with the floppy drive (/media/floppy). The disk was mounted by double
clicking the icon. Attempting to umount from the menus resulted in the
"device busy" message. Could not manually unmount either as a user or
as root.

I'm not on the machine with the problem now, but it is an fc3 OS with
all the current updates other than the kernel which is still the
version  that was installed.

Comment 10 Casey Harkins 2005-03-01 22:08:18 UTC
I'm seeing this problem as well with a usb pen drive. Running lsof
shows that gam_serve has the /media/usbdrive directory open, as well
as /media/usbdrive/.Trash-user directory. This is likely what is
keeping the drive busy.

Comment 11 Casey Harkins 2005-03-01 22:16:15 UTC
Looks like this is a duplicate of bug #142637 which is now closed and
fixed in gamin.

"This was a regression in 0.0.24, this should be fixed in 0.0.25
which is in Rawhide"...


Comment 12 Matthias Clasen 2006-02-16 06:14:46 UTC
Is anybody still seeing this in rawhide ? If so, reopen.