Determining process preventing umount of busy partition

Polytropon freebsd at edvax.de
Wed Feb 11 21:25:17 PST 2009


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. I found
this when going into SUM for checking and maintenance, so I think it would be
good to check which program still accesses files on a specific partition
allthough it should already be terminated due to the different "stop" mechanisms
run for the services in /etc/rc.d and /usr/local/etc/rc.d respectively, which
is performed by init, if I understood this correctly.

Example:

	% shutdown now

	... going SUM, starting sh ...

	# umount /home
	# umount /tmp
	# umount /var
	# umount /usr
	umount: unmount of /usr failed: Device busy
	# umount -f /usr
	# mount -o ro /
	# fsck ... blah blah ...

It would be good to be able to check why the partition is in state "busy" and
possible terminate / kill processes that cause this. Using the force (-f) seems
to be unneccessarily unfriendly. =^_^=

Thanks for suggestions!


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


More information about the freebsd-questions mailing list