umount error. cannot unmount usb disk
Rashkae
ubuntu at tigershaunt.com
Mon Sep 8 13:53:53 UTC 2008
Zhengguo Xu wrote:
> hi all,
>
> recently i had a problem with unmounting a USB hard drive (formated as ext3
> instead of the more common one fat32, if that matters. from what i read,
> fat32 drive has the same problem). when i tried to unmount it, there's error
> message says:
>
> an application is preventing the volumn from being unmounted.
>
> i googled a bit and the first few webs are from ubuntu forum but that
> doesn't help much. here're what i did following the suggestion there:
>
> 1. sudo umount -f /media/disk/
> gives following error:
> umount2: Device or resource busy
> umount: /media/disk: device is busy
> umount2: Device or resource busy
> umount: /media/disk: device is busy
>
> by the way, why does it repeat twice? i only have 1 partition (the whole
> drive formated as 1 ext3 partition)
>
> 2. lsof | grep -i /media/disk gives following infomation:
>
> evince-th 10813 *MYNAME* 6r REG 8,37 100095672 2359648
> /media/disk/Miscellaneous/Literature/*ABCD.pdf* (deleted)
>
> what does that mean? (i changed info about myname and ABCD.pdf, the rest is
> exact what output of the command)
>
> is this the application that prevent the unmounting? however, i didn't open
> any pdf viewing software. i also stopped the process evince before
> unmounting. in fact, i turned off every application i could think of.
>
> nothing works.
>
> so what i did is switching off computer and unplug the drive (for the fear
> of damaging the drive if unpluging it directly) but that is really a pain in
> the ass.
>
> any suggestion is welcome. thanks.
>
> ps: will removing the usb drive without unmounting it first damage the drive
> itself? it seems matters when i use windows. what about it in linux?
If you find yourself stuck like this again, try fuser -m -k /media/disk
That should find any process that is keeping the drive busy and kill it.
I often find this will kill some terminal window I left opened
somewhere (and might even have su from, so I can't even see that it's
hogging the mount)
PS: removing the drive will not physically damage it, in either Windows
or Linux. It can, however, scramble your filesystem in interesting and
subtle ways that might even result in future data getting corrupted, and
would require a reformat to fix.
That's an unlikely, but worst case, scenario.
More information about the ubuntu-users
mailing list