From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 05:25:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66D5C106566C for ; Thu, 12 Feb 2009 05:25:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 278CE8FC17 for ; Thu, 12 Feb 2009 05:25:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-52-176.dynamic.qsc.de [92.196.52.176]) by mx01.qsc.de (Postfix) with ESMTP id 8F2FD3CC17 for ; Thu, 12 Feb 2009 06:25:12 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n1C5P5dF003397 for ; Thu, 12 Feb 2009 06:25:05 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 12 Feb 2009 06:25:05 +0100 From: Polytropon To: FreeBSD Questions Message-Id: <20090212062505.ca66b93e.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Determining process preventing umount of busy partition X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 05:25:17 -0000 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, ...