Busy NFS device - what's causing it?
Mark Knecht
markknecht at gmail.com
Tue Aug 2 18:05:09 UTC 2005
On 8/2/05, Bob McClure Jr <robertmcclure at earthlink.net> wrote:
> On Tue, Aug 02, 2005 at 10:34:29AM -0700, Mark Knecht wrote:
> > Hi,
> > This is jsut a generic question since the list has been pretty
> > quiet. At time I'll want to unmount a volume. For instance, this
> > morning I'm messing around a bit with mount options and I want to see
> > what happens when I try a new option from the command line. However I
> > cannot unmount the volume to try mounting it:
> >
> > dragonfly ~ # umount /video
> > umount: /video: device is busy
> > umount: /video: device is busy
> > dragonfly ~ #
> >
> > Generically, how do I determine why a device is 'busy'? If the
> > system thinks it's busy I assume it keeps that state somewhere. Is it
> > available to me to read? When I grep mtab I see this:
> >
> > dragonfly ~ # cat /etc/mtab | grep video
> > myth14:/video /video nfs
> > rw,noexec,nosuid,nodev,_netdev,addr=192.168.1.14,addr=192.168.1.14 0 0
> > dragonfly ~ #
> >
> > ...telling me where it's located but it doesn't tell me who's using
> > it. I happen to know that the only valid user of this partition is
> > mythbackend which I've shut down, but I still cannot unmount it.
> >
> > So, how do I find what's keeping the partition busy?
> >
> > Cheers,
> > Mark
>
> The tool you want is fuser (as in file user). I've not used it much,
> so "man fuser" for details.
>
> Because I have multiple xterms up, I frequently find that I've left a
> session sitting somewhere in that filesystem. But there have been
> times that fuser didn't report anything and I never did figure out
> what the problem was.
>
> Cheers,
Jason & Bob,
Thanks for the answers. fuser didn't show it this time but lsof
did. The directory is being held by mysql which manages the database
for MythTV. While I did shut down mythbackend I did not shut down
mysql:
dragonfly ~ # lsof | grep video
mysqld 7407 mysql 17u REG 3,10 3072 320906
/var/lib/mysql/mythconverg/videosource.MYI
mysqld 7407 mysql 18u REG 3,10 76 320907
/var/lib/mysql/mythconverg/videosource.MYD
mythbacke 8109 root 9w REG 0,15 0 16
/video/nfslockfile.lock (myth14:/video)
dragonfly ~ # fuser -a /video
/video:
dragonfly ~ #
Thanks,
Mark
More information about the Redhat-install-list
mailing list