labels

I'm still not sure I understand partitions properly, and am even more confused after checking the man pages of glabel():-
EXAMPLES
The following example shows how to set up a label for disk ``da2'', cre-
ate a file system on it, and mount it:

glabel label -v usr /dev/da2
newfs /dev/label/usr
mount /dev/label/usr /usr
[...]
umount /usr
glabel stop usr
glabel unload

The next example shows how to set up a label for a UFS file system:

tunefs -L data /dev/da4s1a
mount /dev/ufs/data /mnt/data

From my reading this example of glabel looks to be assigning a label to a device (disk) not a partition, and then formats the device
Shouldn't the example be glabel label usr /dev/da0p2 ?
 
From glabel(8):
This GEOM class also provides volume label detection for file systems.
Those labels cannot be set with glabel, but must be set with the
appropriate file system utility, e.g. for UFS the file system label is
set with tunefs(8).
Currently supported file systems are:

o UFS1 volume names (directory /dev/ufs/).
o UFS2 volume names (directory /dev/ufs/).
o UFS1 file system IDs (directory /dev/ufsid/).
o UFS2 file system IDs (directory /dev/ufsid/).
o MSDOSFS (FAT12, FAT16, FAT32) (directory /dev/msdosfs/).
o CD ISO9660 (directory /dev/iso9660/).
o EXT2FS (directory /dev/ext2fs/).
o REISERFS (directory /dev/reiserfs/).
o NTFS (directory /dev/ntfs/).

Support for partition metadata is implemented for:

o GPT labels (directory /dev/gpt/).
o GPT UUIDs (directory /dev/gptid/).
 
It's an example. And the example is accurate. But you normally don't use entire disks. That's probably where the confusion comes from.
 
Back
Top