From owner-freebsd-stable@FreeBSD.ORG Tue Oct 12 20:19:38 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE9E9106564A; Tue, 12 Oct 2010 20:19:38 +0000 (UTC) (envelope-from oberman@es.net) Received: from mailgw.es.net (mail1.es.net [IPv6:2001:400:201:1::2]) by mx1.freebsd.org (Postfix) with ESMTP id A97BC8FC16; Tue, 12 Oct 2010 20:19:38 +0000 (UTC) Received: from ptavv.es.net (ptavv.es.net [IPv6:2001:400:910::29]) by mailgw.es.net (8.14.3/8.14.3) with ESMTP id o9CKJc8d023559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 12 Oct 2010 13:19:38 -0700 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 0E4351CC3E; Tue, 12 Oct 2010 13:19:38 -0700 (PDT) To: Stefan Bethke In-reply-to: Your message of "Tue, 12 Oct 2010 22:01:24 +0200." Date: Tue, 12 Oct 2010 13:19:38 -0700 From: "Kevin Oberman" Message-Id: <20101012201938.0E4351CC3E@ptavv.es.net> Cc: stable@freebsd.org, Pawel Jakub Dawidek Subject: Re: Label question...why does ufs label vanish on mount? 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: Tue, 12 Oct 2010 20:19:38 -0000 > From: Stefan Bethke > Date: Tue, 12 Oct 2010 22:01:24 +0200 > > Am 12.10.2010 um 20:51 schrieb Kevin Oberman: > > > For some reason the /dev/ufs/label entry that geom creates for every UFS > > formatted partition is deleted when the device is mounted. This is not > > the case for other file systems, though I have not tried them all. It > > makes the drive much harder to deal with when you have to keep track of > > which physical drive contains the labeled media. It is a particular > > issue for hald and the tools which depend on it. > > In 8, only the ones that are not mounted are removed; they are > restored on unmount. So when you mount the filesystem via it's label, > that entry continues to exist. And it's not limited to any particular > label type, I've noticed the same with partitions that I used gmirror > on. Sorry, but my experience in contrary to that. I mount "/dev/ufs/aux" and that device name is returned by df(1), but 'ls /dev/ufs' no longer contains 'aux'. This broke gnome-mount and required patching hald to ignore device created in /dev/ufs. Otherwise, when the device was removed, the /dev/ufs device was re-created, a devd creation event occurred and the partition was immediately re-mounted. It made it impossible to unplug the USB drive. Joe Marcus added a test of the created device to hald so the creation of /dev/ufs/aux would be ignored and the device always mounted by the hardware device name. This all works fine for msdosfs systems. The /dev/msdosfs entry does stay around when the device is mounted as /dev/msdosfs and all is well. I'd like to see consistent behavior before we get to making devicekit work with FreeBSD. (devicekit will replace hald some day.) > > IIRC, in 7 only the device entry remained, and all label entries were > removed on mount. > > > Is there a good reason for this odd behavior of UFS? If there is not a > > good reason, could it be changed? > > I don't know, but I'm curious myself. When I asked this very question > some time ago, I didn't get a response. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751