Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2010 13:19:38 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        Stefan Bethke <stb@lassitu.de>
Cc:        stable@freebsd.org, Pawel Jakub Dawidek <pjd@FreeBSD.org>
Subject:   Re: Label question...why does ufs label vanish on mount? 
Message-ID:  <20101012201938.0E4351CC3E@ptavv.es.net>
In-Reply-To: Your message of "Tue, 12 Oct 2010 22:01:24 %2B0200." <BFE34769-8E27-47C6-A3B1-734CE5A0806D@lassitu.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> From: Stefan Bethke <stb@lassitu.de>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101012201938.0E4351CC3E>