Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2014 09:38:24 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        lucian@lastdot.org
Cc:        freebsd-net@freebsd.org, Erich Dollansky <erichsfreebsdlist@alogt.com>
Subject:   Re: Where has my /dev/label gone?
Message-ID:  <20140219173824.GI34851@funkthat.com>
In-Reply-To: <cone.1392812668.912159.4595.500@workvmetc>
References:  <CAJ94W%2BzW_uVReTq=CLOqoKZFW_e3sNMsyoLsZnafCMz9voQg_g@mail.gmail.com> <20140219175643.0e744028@X220.alogt.com> <cone.1392810880.797015.4595.500@workvmetc> <20140219201420.7d2f7e1c@X220.alogt.com> <cone.1392812668.912159.4595.500@workvmetc>

next in thread | previous in thread | raw e-mail | index | archive | help
lucian@lastdot.org wrote this message on Wed, Feb 19, 2014 at 12:24 +0000:
> Erich Dollansky writes:
> 
> >On Wed, 19 Feb 2014 11:54:40 +0000
> >lucian@lastdot.org wrote:
> >
> >> Erich Dollansky writes:
> >>
> >> > On Wed, 19 Feb 2014 09:10:53 +0000
> >> > Lucian <lucian@lastdot.org> wrote:
> >> >
> >> > > I set up some labels (glabel label blah /dev/partition) and they
> >> > > show up fine in /dev/label, but once I reboot out of single user
> >> > > mode and into nornal mode /dev/label is gone.
> >> > >
> >> > > What am I missing?
> >> >
> >> > Bermuda triangle?
> >> >
> >> > It sounds strange. Ok, you this in the single user mode. Why? What
> >> > devices did you label?
> >> >
> >> > Hopefully not the devices in use. This does not work from my point
> >> > of view. You would have to use another label type then.
> >>
> >> I did this in single user because according to the docs you can't do
> >> it on a "live system".
> >> http://www.freebsd.org/doc/handbook/geom-glabel.html
> >
> >do you have this in your kernel?
> >
> >options GEOM_LABEL
> >
> >You can also load the module at boot time with an entry
> >in /boot/loader.conf.
> >
> >Erich
> 
> I have GEOM_LABEL loaded, but I noticed something strange.
> If I boot in single user, I can create and see the labels under /dev/label, 
> however if I remount the / filesystem RW then /dev/label disappears.
> BUT, if I just replace my / partition in fstab with the seemingly missing  
> label (eg /dev/label/rootfs) then the system boots up fine and /dev/label 
> is  again available to `ls`. Strange stuff, it should be covered in the  
> handbook...
> Problem solved, I guess.

This is correct, but it's not for the reason people are saying...

The label is in the partition, say ada0s1a... When you mount ada0s1a for
writing (which also sets exclusive access, not just reading), all
children geoms will wither away because you won't be able to open
the children for reading as the mounted partition has exclusive access..
If you later were to remount the partition read-only (I'm not sure if
this drops exclusive/write access, but if it does), then the labels
will show up again, assuming the file system didn't overwrite the
label...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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