Bug 20897 - Manual Eject button on cdrom drv confuses filesystem
Summary: Manual Eject button on cdrom drv confuses filesystem
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Aaron Brown
Depends On: 24067
TreeView+ depends on / blocked
Reported: 2000-11-15 08:05 UTC by Eric B. Decker
Modified: 2007-04-18 16:29 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2002-12-15 03:40:12 UTC

Attachments (Terms of Use)

Description Eric B. Decker 2000-11-15 08:05:18 UTC
Place a cdrom into the drive.  Mount it either via "mount /mnt/cdrom" or
from within Gnome
and clicking on the cdrom icon.  Then on the front of the drive hit the
manual eject button.
The disk is spit out but the os still thinks it is still mounted.  You can
put a different disk
in and close the door.  The os will see the event but still thinks the
previous filesystem
is mounted.  Further the mount point is now busy and difficult to umount..

The drive I have in the system is a year old and supports notification of
eject as well as lock out.  I beleive it is a standard ATAPI DVD-ROM. 
that is the problem.

Distribution:                  Red Hat Linux
Operating System:              Linux
Distribution Version:          Red Hat Linux release 7.0 (Guinness)

Operating System Version:      #1 Tue Aug 22 16:49:06 EDT 2000
Operating System Release:      2.2.16-22
Processor Type:                i686
Host Name:                     hunkingiron
User Name:                     cire
X Display Name:                :0
System Status:                 12:05am  up 36 min,  2 users,  load average:
0.26, 0.33, 0.27

Comment 1 Perry Harrington 2000-12-07 08:36:25 UTC
There is a new set of sysctls controlling cdrom behavior.  One of them enables
door locking.  It is possible that it is not set.  Check the contents of
/proc/sys/dev/cdrom/lock to see if it's 1, if so it lock the door.  If it's 0,
it doesn't lock the door.  For additional debug information, echo a 1 into
/proc/sys/dev/cdrom/debug and tail -f /var/log/messages while pressing the eject
button.  In a normal loop with device unmounted it unlocks the cdrom door each
time through.  If lock is set to 1 when looped through and the cdrom is mounted,
it does not unlock the door, which prevents ejection via the front panel button.
It's possible that the default is 0 in the redhat kernel, or a program at
startup is setting lock to 0.

Comment 2 Eric B. Decker 2001-03-06 22:04:38 UTC
On further research this looks like a Gnome problem.  Gnome can be configured so
that cdroms
are auto mounted on insertion.   When this is the case you can insert a cdrom
and it will be
mounted.  Now when you hit the manual eject button, the disk will be ejected
regardless of
the setting of /proc/sys/dev/cdrom/lock.   The problem then becomes that Gnome
doesn't unmount
the cdrom filesystem.

Seems that when cdrom automount is turned on the front panel button should eject
the disk.  Gnome
seems to have a bug where it doesn't unmount correctly.

This bug should probably be forwarded to the gnome team.

Comment 3 Michael K. Johnson 2001-03-12 20:15:03 UTC
"the disk will be ejected regardless of
 the setting of /proc/sys/dev/cdrom/lock" implies a kernel bug

Note You need to log in before you can comment on or make changes to this bug.