glabel clarification

PJ af.gourmet at
Tue Oct 20 09:57:49 UTC 2009

Polytropon wrote:
> On Mon, 19 Oct 2009 13:12:06 -0400, PJ <af.gourmet at> wrote:
>> this is ad12; ad6 is the same - I guess I hae to get rid of those labels
>> in ad6 but am not sure if I need to use glabel to remove them or if just
>> editing fstab will do it?
> You could indicate if a given disk is your working disk (w)
> or your backup disk (b). A possible fstab would look like
> this:
> The working disk:
> 	/dev/label/w-swap     none      swap  sw  0  0
> 	/dev/label/w-rootfs   /         ufs   rw  1  1
> 	/dev/label/w-tmp      /tmp      ufs   rw  2  2
> 	/dev/label/w-var      /var      ufs   rw  2  2
> 	/dev/label/w-usr      /usr      ufs   rw  2  2
> 	/dev/label/w-home     /home     ufs   rw  2  2
> 	/dev/label/w-backups  /backups  ufs   rw  2  2
> The backup disk:
> 	/dev/label/b-swap     none      swap  sw  0  0
> 	/dev/label/b-rootfs   /         ufs   rw  1  1
> 	/dev/label/b-tmp      /tmp      ufs   rw  2  2
> 	/dev/label/b-var      /var      ufs   rw  2  2
> 	/dev/label/b-usr      /usr      ufs   rw  2  2
> 	/dev/label/b-home     /home     ufs   rw  2  2
> 	/dev/label/b-backups  /backups  ufs   rw  2  2
> (Note that I sorted the partitions by "usage priority".)
> The downside is that you would have to keep a difference
> between /etc/fstab(w) and /etc/fstab(b). On its own, each
> disk will work on any controller (because of proper labels).
> Funny question: What happens if a system has access to
> two disks with labelled partitions where the labels are
> identical?
Exactly what is happening on my system. That's basically what has been
troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6...
well, everytime I boot from ad6 the boot is from ad12 because both have
identical labels. The only way out is to change the labels on ad6 to
point to ad6 partitions and not to /dev/label/name.
So the only reason to use glabel, in my case, is to boot from the clone
on another system without worrying about the actual disk label. Once
it's booted, the label can be changed to conform to the label on the new

More information about the freebsd-questions mailing list