[Linux-ha-dev] Filesystem not umounted because fuser does not
see unix domain sockets
David Lee
t.d.lee at durham.ac.uk
Wed Jun 27 05:11:46 MDT 2007
On Tue, 26 Jun 2007, Lars Marowsky-Bree wrote:
> On 2007-06-22T17:59:01, Lars Ellenberg <lars.ellenberg at linbit.com> wrote:
>
> > > > so we may want to complement the "$FUSER -a -k -v -m" with
> > > > something like
> > > > lsof -U | awk '/ \/'"$mountpoint"'\// { print $2 }' | xargs -- kill
>
> Hey David and Matthew, how portable is the above command to BSD et al?
"lsof" isn't native to Solaris, not even at its (current) "Solaris 10"
release.
Judging by the BSD man pages, its native availability there seems patchy.
So could I suggest, if reasonably possible, code of the form:
if [ -x @LSOF@ ]
then
... @LSOF ...
else
... @FUSER@ ...
fi
recognising that some sort of additional error-handling for the @FUSER@
case might be necessary?
Need the absence of "lsof" be a show-stopper, so long as "fuser" is
present?
Incidentally I recommend the man-page site:
http://www.freebsd.org/cgi/man.cgi?
It allows you to see man pages for various versions of various OSes, not
just BSD, but Solaris, Linux flavours, HPUX, ... Well worth bookmarking.
--
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: UNIX Team Leader Durham University :
: South Road :
: http://www.dur.ac.uk/t.d.lee/ Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :
More information about the Linux-HA-Dev
mailing list