Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Nov 1999 17:04:22 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Jan Pechanec <pechy@hp735.cvut.cz>
Cc:        Mats Lofkvist <mal@algonet.se>, freebsd-fs@FreeBSD.ORG
Subject:   Re: stupidfs - easily extensible test file systems? 
Message-ID:  <19991109090422.B69CF1CC7@overcee.netplex.com.au>
In-Reply-To: Your message of "Tue, 09 Nov 1999 09:45:55 %2B0100." <Pine.SGI.4.05.9911090943400.5402-100000@akat.civ.cvut.cz> 

next in thread | previous in thread | raw e-mail | index | archive | help
Jan Pechanec wrote:
> On 6 Nov 1999, Mats Lofkvist wrote:
> 
> >julian@whistle.com (Julian Elischer) writes:
> >> On Fri, 5 Nov 1999, Jan Pechanec wrote:
> >> > 
> >> > 	BTW, don't you know why deadfs was written? No doc in FreeBSD.
> >> > From what I saw in the source code, operations just fail.
> >> > 
> >> When youhave a vnode open, and for some reason the filesystem the vmode
> >> pints to disappears (e.g. the disk is removed, or the PC-CARD is removed,
> >> or many other posibilties), then you cannot track down all teh users fo
> >> that vnode very easily, so insteadm you 'fiddle' with it to make it
> >> reference the DEADFS (use VGONE) and when the users try use it again they
> >> will safely get an error, but at least the system will
> >> not core-dump when they access a non existant filesyste,/device.
> >
> >I guess deadfs is what makes the -f (force) flag to umount work
> >also, and that one is a truly great feature in FreeBSD missing in
> >many other unixen (e.g. solaris {and linux, I believe}).
> >
> >Having to track down all processes with open descriptors on e.g.
> >a nfs mount before being able to umount it is a real pain in the *,
> >most times I give up on it and reboot the machine instead.
> 
> 	I am not so experienced with FreeBSD, but SGI IRIX has
> ``fuser'' command. This command can find all processes that has open
> files inside the mounted fs. You can easily write a script that kill
> them all.

SVR4's fuser command (derived from SVR3 which was a bit simpler) had a
built-in -k (kill) switch.  So, you could 'fuser -k /home' which would
kill -9 any process using /home.  The problem was it had a bit of a nasty
tendancy to panic the system since it was moved from userland to a syscall
in SVR4.0.  Anyway, deadfs is another solution to the problem.  I would
use both if available.  'fstat' and 'lsof' are reasonable substitutes for
fuser.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991109090422.B69CF1CC7>