From owner-freebsd-current@FreeBSD.ORG Wed Jun 22 06:54:01 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC61216A41C for ; Wed, 22 Jun 2005 06:54:01 +0000 (GMT) (envelope-from philip@paeps.cx) Received: from gateway.nixsys.be (gateway.nixsys.be [195.144.77.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4181A43D53 for ; Wed, 22 Jun 2005 06:54:01 +0000 (GMT) (envelope-from philip@paeps.cx) Received: from loge.nixsys.be (loge.nixsys.be [IPv6:2001:838:37f:0:20c:6eff:fe4b:23f]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "loge.home.paeps.cx", Issuer "NixSys CA" (verified OK)) by gateway.nixsys.be (Postfix) with ESMTP id 8DABCC120 for ; Wed, 22 Jun 2005 08:53:58 +0200 (CEST) Received: from loge.nixsys.be (philip@localhost [127.0.0.1]) by loge.nixsys.be (8.13.4/8.13.4) with ESMTP id j5M6rwlD001276 for ; Wed, 22 Jun 2005 08:53:58 +0200 (CEST) (envelope-from philip@loge.nixsys.be) Received: (from philip@localhost) by loge.nixsys.be (8.13.4/8.13.4/Submit) id j5M6rvau001275 for freebsd-current@freebsd.org; Wed, 22 Jun 2005 08:53:57 +0200 (CEST) (envelope-from philip) Date: Wed, 22 Jun 2005 08:53:57 +0200 From: Philip Paeps To: freebsd-current@freebsd.org Message-ID: <20050622065357.GA694@loge.nixsys.be> Mail-Followup-To: freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Date-in-Rome: ante diem X Kalendas Iulias MMDCCLVIII ab Urbe Condida X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879 X-Message-Flag: Get a proper mailclient! Organization: Happily Disorganized User-Agent: Mutt/1.5.9i Subject: Unable to umount union-parts after umounting unionfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 06:54:01 -0000 When playing with union filesystems this morning, I noticed that it's not possible to unmount the directory mounted on union cleanly, even after the union has been cleanly unmounted, once you've read from the union: Setup: # touch fs1 fs2 # mkdir tstfs # mdconfig -a -t vnode -f fs1 -s 16M # mdconfig -a -t vnode -f fs2 -s 16M # newfs /dev/md0 # newfs /dev/md1 # mount /dev/md0 tstfs/ # mount /dev/md1 /mnt # mount -t unionfs /mnt tstfs/ Trying to umount /mnt now fails as expected: # umount /mnt umount: unmount of /mnt failed: Device busy Unmounting after the union has been unmounted without anything having been read from it or written to it, is no problem either: # umount tstfs/ # umount /mnt When something has been written to the union, but nothing has been read from it, there's not problem either: # touch tstfs/foo # umount tstfs/ # umount /mnt When something has been read, however: # ls tstfs/ .snap/ foo # umount tstfs/ # umount /mnt umount: unmount of /mnt failed: Device busy Strangely, when an 'empty' union is read from, there's no problem unmounting it. It's only when it's read when there's something on it. In other words, from a clean setup: # ls tstfs/ .snap/ # umount tstfs/ # umount /mnt But (continuing on the clean setup): # mount /dev/md1 /mnt # mount -t unionfs /mnt tstfs/ # touch tstfs/foo # umount tstfs/ # umount /mnt # mount /dev/md1 /mnt # mount -t unionfs /mnt tstfs/ # ls tstfs/ .snap/ foo # umount tstfs/ # umount /mnt umount: unmount of /mnt failed: Device busy Is anyone else seeing this? :-) - Philip -- Philip Paeps Please don't Cc me, I am philip@freebsd.org subscribed to the list. BOFH Excuse #237: Plate voltage too low on demodulator tube