# glabel existing boot drive?



## dave (Sep 21, 2011)

Is it possible for me to glabel my existing boot drive?  I am trying to make changes to my zfs array, and when I add a new drive, it results in my boot drive being renumbered, and the system will not boot.   Can I create a label for the entire boot drive?  How would my fstab file have to change?  Thanks!


----------



## wblock@ (Sep 21, 2011)

It should be pretty safe to glabel(8) a disk after it's been created.  The last block of the drive will be overwritten, but it's probably not being used by anything else.

However, there's a safer way.  Label the filesystems on the disk, and mount them by those labels.  glabel is used to label the swap partition only, not the drive.
FreeBSD Labeled Filesystems


----------



## dave (Sep 21, 2011)

Thanks, that's exactly what I needed to know.  I labelled the partitions instead of the whole drive per instructions here:

http://www.freebsd.org/doc/handbook/geom-glabel.html

And that worked fine for me.  Now the system boots regardless of drive enumeration order.  Going to use labels from now on!


----------



## dave (Sep 22, 2011)

OK, it gets worse...

One of my drives actually failed while it was being replaced (during zpool replace process).  If I boot the machine with it physically attached, then the machine freezes when I try to run any zpool commands.  If I detach it, the drives renumber themselves and the pool cannot be loaded. 

Is there any way that I can label the existing drives or force them to use particular dev numbers, or have I lost my entire pool due to drive re-numbering?


----------



## wblock@ (Sep 22, 2011)

That would depend on ZFS, I think.  But I have not used ZFS.


----------



## dave (Sep 26, 2011)

Follow-up here: http://forums.freebsd.org/showthread.php?p=148615#post148615


----------

