Bug 120655 - Unable to eject CDrom on /dev/hda
Unable to eject CDrom on /dev/hda
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: eject (Show other bugs)
2.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-12 14:41 EDT by Mark Campbell
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-08 06:06:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Campbell 2004-04-12 14:41:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 
7.23  [en]

Description of problem:
uname: Linux localhost.localdomain 2.4.9-e.3smp #1 SMP Fri May 3 16:
48:54 EDT 2002 i686 unknown

Red Hat Linux Advanced Server release 2.1AS (Pensacola)

Unable to eject a CDROM which is attached to /dev/hda, there are no 
other CDROM opperation troubles.  The drive can mounted and 
unmounted, there are no physical performance problems.  

Output included below.

I have been able to replicate this on machines with the same 
hardware.  (SUN Cobalt LX50).

Version-Release number of selected component (if applicable):
eject-2.0.9-2 and eject-2.0.12-7

How reproducible:
Always

Steps to Reproduce:
1. simply running eject -v


Actual Results:  eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hda'
eject: `/dev/hda' is mounted at `/mnt/cdrom'
eject: unmounting `/dev/hda'
eject: `/dev/hda' is a multipartition device
eject: trying to eject `/dev/hda' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/hda' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/hda' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/hda' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument

Expected Results:  No output, simply the cdrom doesn't eject.  This 
is causing problems for applications which need to switch CD's 
(VMWare in my case)

Additional info:

Strace last outputs:

open("/dev/hda", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, 0x5309, 0xbffecae8)            = -1 EBUSY (Device or 
resource busy)
ioctl(3, 0x1, 0xbffec990)               = -1 EINVAL (Invalid 
argument)
ioctl(3, 0x25a, 0xbffecae8)             = -1 EINVAL (Invalid 
argument)
ioctl(3, 0x40086d01, 0xbffecaa0)        = -1 EINVAL (Invalid 
argument)
open("/usr/share/locale/en_US/LC_MESSAGES/eject.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/eject.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
write(2, "eject: unable to eject, last err"..., 53eject: unable to 
eject, last error: Invalid argument
) = 53
_exit(1)                                = ?
Comment 1 Ngo Than 2004-04-13 18:10:18 EDT
it looks like your device is still busy and used from other process.
is your device still mounted after doing eject?

>Expected Results:  No output, simply the cdrom doesn't eject.  This 
>is causing problems for applications which need to switch CD's 
>(VMWare in my case)

what do you mean here?
Comment 2 Mark Campbell 2004-04-24 19:39:42 EDT
Drive is not mounted:

[root@localhost root]# mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/sda3 on /usr type ext3 (rw)
/dev/sda5 on /var type ext3 (rw)
/dev/md0 on /raid0 type ext3 (rw)

If I eject a mounted CDROM then the drive gets unmounted, however it 
is not physically ejected.


This causes a problem for my VMWare application because it is unable 
to eject the physical CDROM drive so I am unable to perform the OS 
installation.  However it causes problems for any applications which 
require the ability to eject the cd drive.
Comment 3 Ngo Than 2004-09-08 06:06:01 EDT
it looks like that your CDROM drive does not have the ability to eject.

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