[CentOS] Can't umount flash drive because an application has it locked
Todd Denniston
Todd.Denniston at tsb.cranrdte.navy.mil
Fri May 21 00:56:57 UTC 2010
MHR wrote, On 05/20/2010 08:38 PM:
> This occasionally happens to me when I've been editing an OOo document
> that resides on a flash drive I use with one of my laptops. I've
> tried poking around in ps to find out which process has the drive
> locked, and I can't figure it out. Nothing directly refers to the
> flash drive except one of the hald processes, and it's just scanning
> the drive (I tried killing that and it made no difference).
>
<SNIP>
>
> What am I missing?
>
when next it happens, you might try (note, you are playing with a root tool, it may or may not work
as a normal user):
/sbin/fuser -m /media/myFlashDrive/
or
/usr/sbin/lsof /media/myFlashDrive/
What can be *really* frustrating, is when those commands (with any options) don't give any info, and
you cant get it unmounted (granted I have not seen that since using Fedora 1 machines with DRBD as
an NFS server).
man fuser
"-m ... All processes accessing files on that file system are listed. ..."
man lsof
--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
More information about the CentOS
mailing list