From owner-freebsd-stable@FreeBSD.ORG Sun Jul 4 23:34:06 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292B5106564A for ; Sun, 4 Jul 2010 23:34:06 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:36b8:7bff:fee0:1a08]) by mx1.freebsd.org (Postfix) with ESMTP id 74DA78FC12 for ; Sun, 4 Jul 2010 23:34:05 +0000 (UTC) Received: from ur.dons.net.au (ppp121-45-156-127.lns6.adl6.internode.on.net [121.45.156.127]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o64NXTDS089686 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 5 Jul 2010 09:03:35 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <4C30AAA8.7010206@andric.com> Date: Mon, 5 Jul 2010 09:03:29 +0930 Content-Transfer-Encoding: 7bit Message-Id: References: <4C309359.8000502@andric.com> <791316F7-6E16-47D7-9B6C-2881FAAC78AA@gsoft.com.au> <4C30AAA8.7010206@andric.com> To: Dimitry Andric X-Mailer: Apple Mail (2.1081) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: FreeBSD Stable Subject: Re: GEOM/bsdlabel regression in 8.x? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2010 23:34:06 -0000 On 05/07/2010, at 1:07, Dimitry Andric wrote: > bsdlabel -e /dev/md0s1 > > The last one indeed fails, because the device is in use. This is > expected, but the error message is very misleading, and should be > improved. Maybe, I wouldn't call it expected because it used to work :) I agree about the error message though! > The real 'bug' (although there will probably be loads of bikesheds about > it) is probably that if you *do* unmount the filesystem, bsdlabel still > fails: > > umount /mnt/test > bsdlabel -e /dev/md0s1 > [class not found yada yada] > > Apparently, unmounting does not properly 'release' whatever underlying > geom device is preventing read/write access. However, if you then set > the footshooting flag: > > sysctl -w kern.geom.debugflags=0x10 > bsdlabel -e /dev/md0s1 > > bsdlabel can write without problems, at least on my box. Stranger > even, if you subsequently turn off the footshooting flag, it *still* > can write to the label. That is, unless you mount and unmount the > filesystem, after which is again, sort of 'locked' against writing. > > All highly confusing. :) Hmm odd, the sysctl had no effect here.. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C