From: Douglas Gilbert <dougg@torque.net>
To: Jim <jim999@gmx.net>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser)
Date: Wed, 20 Jul 2005 14:28:43 +1000 [thread overview]
Message-ID: <42DDD2FB.5020306@torque.net> (raw)
In-Reply-To: <29775.1121817486@www15.gmx.net>
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
prev parent reply other threads:[~2005-07-20 4:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42DDD2FB.5020306@torque.net \
--to=dougg@torque.net \
--cc=jim999@gmx.net \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).