Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 07:08:37 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Determining process preventing umount of busy partition
Message-ID:  <20090212070837.08bbf237.freebsd@edvax.de>
In-Reply-To: <18835.46899.607357.649275@jerusalem.litteratus.org>
References:  <20090212062505.ca66b93e.freebsd@edvax.de> <18835.46899.607357.649275@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Feb 2009 00:44:19 -0500, Robert Huff <roberthuff@rcn.com> wrote:
> 
> Polytropon writes:
> 
> >  I'd like to ask how to determine which process (or program) keeps
> >  a partition in state "busy" so that umount will refuse to unmount
> >  this partition. 
> 
> 	The traditional tool for doing this is sysutils/lsof.
> 	(Please let me know if it compiles.)

Sadly not, but my Ports tree is not up to date, so I tried to compile
it in PORTVERSION=4.82A, with this error:

===>  Building for lsof-4.82A,3
(cd lib; make DEBUG="-O2" CFGF="-fno-strict-aliasing -pipe -march=pentium4 -march=pentium4 -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASCPUMASK_T -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_SI_UDEV -DHAS_SI_PRIV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DFREEBSDV=7000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHAS_STRFTIME -DLSOF_VSTR=\"7.0-STABLE\"")
cc  -fno-strict-aliasing -pipe -march=pentium4 -march=pentium4 -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASCPUMASK_T -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_SI_UDEV -DHAS_SI_PRIV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DFREEBSDV=7000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHAS_STRFTIME -DLSOF_VSTR="7.0-STABLE" -I/usr/src/sys -O2 -c ckkv.c
In file included from ckkv.c:33:
../machine.h:62: error: redefinition of typedef 'cpumask_t'
/usr/src/sys/sys/types.h:146: error: previous declaration of 'cpumask_t' was here
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.82A.freebsd/lib.
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.82A.freebsd.
*** Error code 1

Stop in /usr/ports/sysutils/lsof.




After I updated my Ports (just right now) I saw that lsof didn't change,
still same version number.




Installation via pkg_add -r worked without problems.

# pkg_add -r lsof
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/lsof.tbz... Done.

I've got lsof-4.82A,3 now. The manpage reveals that this seems to be
exactly what I've been searching for, so "lsof | grep usr" should to
the trick. Thanks!


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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