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. Is there a good reason for this odd behavior of UFS? If there is not a good reason, could it be changed? -- 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
Jeremy Chadwick
2010-Oct-12 18:56 UTC
Label question...why does ufs label vanish on mount?
On Tue, Oct 12, 2010 at 11:51:00AM -0700, Kevin Oberman wrote:> 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. > > Is there a good reason for this odd behavior of UFS? If there is not a > good reason, could it be changed?I'm not sure if you're talking about "tunefs -L", or glabel(8). If you're talking about glabel(8): gotta read the man page carefully. There's two types of labels: "automatic" (glabel label) and "manual" (glabel create). "Automatic" labels are stored in the disk metadata, so they're retained after reboots + loaded during tasting, etc.. "Manual" labels are temporary, and have to be manually set every time the system starts. As for "tunefs -L" -- I never quite understood what this was for given glabel's existence. I don't know if the two are synonymous in some way either. I'm certain someone here can shed light on that association, if any at all. HTH, FWIW... -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
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. 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. Stefan -- Stefan Bethke <stb@lassitu.de> Fon +49 151 14070811
Andrey V. Elsukov
2010-Oct-13 05:12 UTC
Label question...why does ufs label vanish on mount?
On 12.10.2010 22:51, Kevin Oberman wrote:> 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. > > Is there a good reason for this odd behavior of UFS? If there is not a > good reason, could it be changed?When you are opening provider for writing (i.e. mount FS) GEOM(4) initiates SPOILING and all consumers that are attached to this provider except one will self-destroyed. When you are closing provider GEOM(4) initiates TASTING and consumers can return back. Look at man 4 geom for details. -- WBR, Andrey V. Elsukov -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20101013/9c26ffac/signature.pgp
Am 13.10.2010 um 06:56 schrieb Andrey V. Elsukov:> On 12.10.2010 22:51, Kevin Oberman wrote: >> 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. >> >> Is there a good reason for this odd behavior of UFS? If there is not a >> good reason, could it be changed? > > When you are opening provider for writing (i.e. mount FS) GEOM(4) > initiates SPOILING and all consumers that are attached to this provider > except one will self-destroyed. When you are closing provider GEOM(4) > initiates TASTING and consumers can return back. Look at man 4 geom > for details.That explains the mechanism, but not the rationale. Or is it just an unintended consequence? And how is da2p1 different from ufs/mylabel? (Mount da2p1 and ufs/mylabel is removed, but not the other way around.) Stefan -- Stefan Bethke <stb@lassitu.de> Fon +49 151 14070811
Jeremy Chadwick
2010-Oct-13 06:33 UTC
Label question...why does ufs label vanish on mount?
On Wed, Oct 13, 2010 at 08:29:06AM +0200, Stefan Bethke wrote:> Am 13.10.2010 um 06:56 schrieb Andrey V. Elsukov: > > > On 12.10.2010 22:51, Kevin Oberman wrote: > >> 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. > >> > >> Is there a good reason for this odd behavior of UFS? If there is not a > >> good reason, could it be changed? > > > > When you are opening provider for writing (i.e. mount FS) GEOM(4) > > initiates SPOILING and all consumers that are attached to this provider > > except one will self-destroyed. When you are closing provider GEOM(4) > > initiates TASTING and consumers can return back. Look at man 4 geom > > for details. > > That explains the mechanism, but not the rationale. Or is it just an unintended consequence? And how is da2p1 different from ufs/mylabel? (Mount da2p1 and ufs/mylabel is removed, but not the other way around.)Pulling in pjd@ who can probably shed some light on this. Pawel, you might be interested in this part of the thread specifically: http://lists.freebsd.org/pipermail/freebsd-stable/2010-October/059483.html -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |