Label question...why does ufs label vanish on mount?

Jeremy Chadwick freebsd at jdc.parodius.com
Tue Oct 12 18:56:51 UTC 2010


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 at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-stable mailing list