glabels and GPT

What is considered the "proper" way to combine using glabel to label disks and GPT partitioning? If I do it like this:

Code:
glabel label -v disk00 /dev/ad1
gpart create -s GPT /dev/ad1
<create partitions>

Then I am guessing that writing out the partition table will overwrite the last sector, deleting the glabel metadata, correct?

So should I instead do this:

Code:
gpart create -s GPT /dev/ad1
<create partitions>
glabel label -v disk00 /dev/ad1

But won't the label overwrite a part of partition data? Or, should I instead do this:

Code:
glabel label -v disk00 /dev/ad1
gpart create -s GPT [B]/dev/label/disk00[/B]
<create partitions>

And from that point on, always avoid ever dealing with the disk device directly, only ever accessing and modifying it through the label?
 
Additionally, the gpart manpage refers to "logical blocks" in a couple of places. Am I right in thinking these parts actually refer to "sectors", because both seem to be 512 bytes?
 
I used this:

Code:
gpart create -s GPT da0
gpart add -t freebsd-ufs da0
newfs -U -o time  -f 8192 -b 65536 /dev/da0p1
tunefs -L files da0p1

This worked well (use tunefs for ufs filesystems instead of glabel to get the label below /dev/ufs instead of /dev/label)
 
Back
Top