[comp.unix.questions] umount : fs busy

psloot@neabbs.UUCP (PAUL SLOOTMAN) (09/05/88)

When I want to umount a filesystem, I sometimes (entirely correctly)
get the message "umount failed: file system busy".
 
My uestion is: how can I find out who or what is keeping it busy?
Obviously it can be found, 'cos umount knows about it. The system
in question is SysV.
 
Thanks in advance for any answers.
 
 
#define ADDRESS        ...!mcvax!neabbs!psloot
 
#define        QUOTE        (Arsonists of the world -- Ignite! :-)

psloot@neabbs.UUCP (PAUL SLOOTMAN) (09/05/88)

When I want to umount a filesystem, I sometimes (entirely correctly)
get the message "umount failed: file system busy".
 
My question is: how can I find out who or what is keeping it busy?
Obviously it can be found, 'cos umount knows about it. The system
in question is SysV.
 
Thanks in advance for any answers.
 
 
#define ADDRESS        ...!mcvax!neabbs!psloot
 
#define QUOTE        (Arsonists of the world -- Ignite! :-)

hulsebos@philmds.UUCP (Rob Hulsebos) (09/06/88)

In article <27261@neabbs.UUCP> psloot@neabbs.UUCP (PAUL SLOOTMAN) writes:
>When I want to umount a filesystem, I sometimes (entirely correctly)
>get the message "umount failed: file system busy".
> 
>My uestion is: how can I find out who or what is keeping it busy?

You may want to try the 'fuser(1M)' utility, if it is available on your 
system.

------------------------------------------------------------------------------
R.A. Hulsebos, Philips I&E Automation Modules       ...!mcvax!philmds!hulsebos
Building TQ-III-1 room 11                                 phone: +31-40-785723
Eindhoven, The Netherlands                                # cc -O disclaimer.c

lvc@cbnews.ATT.COM (Lawrence V. Cipriani) (09/07/88)

In article <27261@neabbs.UUCP> psloot@neabbs.UUCP (PAUL SLOOTMAN) writes:
>When I want to umount a filesystem, I sometimes (entirely correctly)
>get the message "umount failed: file system busy".
> 
>My uestion is: how can I find out who or what is keeping it busy?
>Obviously it can be found, 'cos umount knows about it. The system
>in question is SysV.

See /etc/fuser(1M) in the UNIX(tm) Administrators Reference Manual.
fuser can tell you what process id's are using a file or file system.
fuser will even kill those processes with the -k option.  This can
be useful when shutting down a machine, though fuser can be very slow.
I found /etc/killall to be a better solution when shutting down.
If you use the -u option of fuser it will give the user names that
owns the process.

-- 
Larry Cipriani, AT&T Network Systems, Columbus OH, cbnews!lvc lvc@cbnews.ATT.COM

zjat02@apctrc.UUCP (Jon A. Tankersley) (09/08/88)

Tis simple...


Something somewhere has a file/directory open/accessed on that file system.

Mount something in /mnt.  cd /mnt/whatever.  umount /mnt.
it will fail.  A shell has . accessed as the current directory....

There is fuser or ofiles programs available in various places.  I don't
have fuser and ofiles has some bugs (doesn't do nfs mounts well).

Also - bug alert on SunOS 3.X...

rc.boot trashes /etc/mtab before running /etc/umount -at nfs.  This leaves
potential garbage on remote systems /etc/rmtab (remote mtab).  4.0 has
fixed the problem.
Moving the umount up before the trashing of mtab won't fix the problem because
the enternet needs to be started also....  Sigh.

-tank-
-- 
#include <disclaimer.h>		/* nobody knows the trouble I .... */

torsten@pcsbst.UUCP (Torsten Homeyer) (09/08/88)

In article <27261@neabbs.UUCP> psloot@neabbs.UUCP (PAUL SLOOTMAN) writes:
>When I want to umount a filesystem, I sometimes (entirely correctly)
>get the message "umount failed: file system busy".
> 
>My uestion is: how can I find out who or what is keeping it busy?
>Obviously it can be found, 'cos umount knows about it. The system
>in question is SysV.

	Try "fuser".  It tell you the prozessids which work on that device.
	"fuser -k" will kill them.

		Torsten.
---
Name    : Torsten Homeyer         {tho@pcsbst ; torsten@homeyer}.UUCP
Company : PCS GmbH, Munich W-Germany.
UUCP  : ..uunet!unido!pcsbst!tho     ..uunet!unido!pcsbst!sws4!torsten
PRIVAT: ..unido!{pcsbst,megalon,mikros,[altger,netmbx]!oldman}!homeyer!torsten

dmt@ptsfa.PacBell.COM (Dave Turner) (09/08/88)

In article <1094@cbnews.ATT.COM> lvc@cbnews.ATT.COM (Lawrence V. Cipriani) writes:
>In article <27261@neabbs.UUCP> psloot@neabbs.UUCP (PAUL SLOOTMAN) writes:
>>When I want to umount a filesystem, I sometimes (entirely correctly)
>>get the message "umount failed: file system busy".
>> 
>
>See /etc/fuser(1M) in the UNIX(tm) Administrators Reference Manual.
>fuser can tell you what process id's are using a file or file system.

On System V, accounting will keep /usr busy and fuser won't say why.
If it's /usr that is busy, try:

	/usr/lib/acct/shutacct






-- 
Dave Turner	415/542-1299	{att,bellcore,sun,ames,pyramid}!pacbell!dmt

jfh@rpp386.Dallas.TX.US (The Beach Bum) (09/10/88)

In article <792@philmds.UUCP> hulsebos@philmds.UUCP (Rob Hulsebos) writes:
[In article <27261@neabbs.UUCP> psloot@neabbs.UUCP (PAUL SLOOTMAN) writes:
[>When I want to umount a filesystem, I sometimes (entirely correctly)
[>get the message "umount failed: file system busy".
[> 
[>My uestion is: how can I find out who or what is keeping it busy?
[
[You may want to try the 'fuser(1M)' utility, if it is available on your 
[system.

you may also want to check the c.s.unix and c.s.misc archives for
reimplementations of fuser.  you should be able to port fuser to your
system in a few hours if the correct one is not preset.
-- 
John F. Haugh II (jfh@rpp386.Dallas.TX.US)                   HASA, "S" Division

    "If the code and the comments disagree, then both are probably wrong."
                -- Norm Schryer