linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser)
       [not found] <29450.1121817356@www6.gmx.net>
@ 2005-07-19 23:58 ` Jim
  2005-07-20  4:28   ` Douglas Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Jim @ 2005-07-19 23:58 UTC (permalink / raw)
  To: linux-ide, linux-scsi

Symptom: Cannot umount a CD-Rom in my CD-Roaster/Burner/Toaster whatever

Reason to write to ide AND Scsi-List: Its an IDE - Drive, but with
scsi-emulation running. So my 4 questions: WHY is the drive locked? And
HOW to work arround it other than to reboot the system? Can't a forced    
umount be implemented for other cases than just for NFS (as manpage 
sais)? Or is my system just too old and buggy? (because it is, besides from
updates)

And yes: It's more than once this happened:

# umount /mnt/toaster
umount: /mnt/toaster: device is busy
# fuser  -v -m /mnt/toaster/
# mount | grep toaster
/dev/scd0 on /mnt/toaster type iso9660 (ro,noexec,...)
# lsof | grep -e scd0 -e toaster
# umount /mnt/toaster
umount: /mnt/toaster: device is busy
# umount -f /mnt/toaster
umount2: Device or resource busy
umount: /dev/scd0: not mounted
umount: /mnt/toaster: Illegal seek
# umount /dev/scd0 || umount -f /dev/scd0
umount: /mnt/toaster: device is busy
umount2: Device or resource busy
umount: /dev/scd0: not mounted
umount: /mnt/toaster: Illegal seek
# umount -V
umount: mount-2.10m
# fuser -V
fuser from psmisc version 18
#


-- 
Greetings, Jim

-- 
Gruss, Jim

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser)
  2005-07-19 23:58 ` Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser) Jim
@ 2005-07-20  4:28   ` Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2005-07-20  4:28 UTC (permalink / raw)
  To: Jim; +Cc: linux-ide, linux-scsi

Jim wrote:
> Symptom: Cannot umount a CD-Rom in my CD-Roaster/Burner/Toaster whatever
> 
> Reason to write to ide AND Scsi-List: Its an IDE - Drive, but with
> scsi-emulation running. So my 4 questions: WHY is the drive locked? And
> HOW to work arround it other than to reboot the system? Can't a forced    
> umount be implemented for other cases than just for NFS (as manpage 
> sais)? Or is my system just too old and buggy? (because it is, besides from
> updates)
> 
> And yes: It's more than once this happened:
> 
> # umount /mnt/toaster
> umount: /mnt/toaster: device is busy
> # fuser  -v -m /mnt/toaster/
> # mount | grep toaster
> /dev/scd0 on /mnt/toaster type iso9660 (ro,noexec,...)
> # lsof | grep -e scd0 -e toaster
> # umount /mnt/toaster
> umount: /mnt/toaster: device is busy
> # umount -f /mnt/toaster
> umount2: Device or resource busy
> umount: /dev/scd0: not mounted
> umount: /mnt/toaster: Illegal seek
> # umount /dev/scd0 || umount -f /dev/scd0
> umount: /mnt/toaster: device is busy
> umount2: Device or resource busy
> umount: /dev/scd0: not mounted
> umount: /mnt/toaster: Illegal seek
> # umount -V
> umount: mount-2.10m
> # fuser -V
> fuser from psmisc version 18
> #

Jim,
Linux uses the "prevent allow medium removal" MMC
command to effectively lock the medium (disc) in the
drive while a file system on it is mounted. The eject
linux command tries to unmount any file systems
before unlocking and ejecting the disc. If the unmount
fails (e.g. "Device or resource busy) then it won't
unlock the drive. Perhaps eject has/should_have an
option to bypass the unmount when it fails.

The lsof command may help you find which application
has a file open and therefore inhibiting the unmount.
If that doesn't work then fetch the sg3_utils package
and the sg_prevent utility in there may be of interest.
Assuming your cd/dvd drive is /dev/sg0 then this should
eject your drive in lk 2.4 :
    sg_prevent --prevent=0 /dev/sg0
    sg_start -loej /dev/sg0

In the lk 2.6 series the actual device name could be
used (e.g. /dev/hdd rather than /dev/sg0).

Soon I will release sdparm 0.94 which adds some commands.
The sequence to unlock then eject would be:
    sdparm -C unlock /dev/hdd
    sdparm -C eject /dev/hdd

BTW After the unlock operation is successful the eject
button on the drive should work.

Doug Gilbert





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-20  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <29450.1121817356@www6.gmx.net>
2005-07-19 23:58 ` Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser) Jim
2005-07-20  4:28   ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).