[ILUG] faq: how to umount a cdrom without rebooting?
Niall O Broin
niall at linux.ie
Thu Nov 23 14:01:23 GMT 2006
On 23 Nov 2006, at 13:36, Conor McDermottroe wrote:
> On Thu, 2006-11-23 at 11:14 +0000, Niall O Broin wrote:
>> Other than that, it's reboot time. I've had this happen before. I
>> want a new switch added to umount to mean unmount it NOW and fuck
>> the begrudgers
> umount -f doesn't do that for you?
Not always, no. That's specifically for umounting a filesystem
mounted from a now unreachable NFS server. Won't do squat for a cdrom
held open by a mystery process.
But here's a little hint from my pain, which has caught me twice in
the last couple of days, making me unnecessarily reboot a remote box
(not really yet in use, thankfully). Hopefully it might spare
The filesystem in question was an LVM volume for a Xen domU. I had
mounted the filsystem and chrooted into it for whatever maintenance
reason. On leaving the chroot, I could not umount the filesystem -
got the good old /mnt/blah is busy message. Fuser and lsof were
equally silent. The third time this happened, rather than rebooting
in annoyance, I thought a little harder (amazing how often that
helps) and then remembered that before going into the chroot I had
mounted its /proc filesystem like
mount proc-chroot /mnt/blah/proc -t proc -o defaults
so a simple umount /mnt/blah/proc was all that was needed.
More information about the ILUG