For a list of all the label tunables, use
sysctl kern.geom.label
. You can verify that
kern.geom.label.gpt.enable is set to 1, which means you should have something in
/dev/gpt, assuming at least one GPT partition with a label is unmounted.
In case you're unaware, a GPT partition's label/ID is unlisted if the partition is not mounted using that label/ID. By extension, if all GPT partitions are mounted/online through their
/dev/XXXpNN names, then
/dev/gpt and
/dev/gptid will not even exist. As an example,
/dev/gpt/zfs1 will not appear when it is online on my system:
Code:
ROOT# ls -C /dev/gpt
efiboot0 efiboot1 gptboot0 gptboot1
ROOT# zpool offline desktop zfs1
ROOT# ls -C /dev/gpt
efiboot0 efiboot1 gptboot0 gptboot1 zfs1
ROOT# zpool online desktop zfs1
ROOT# ls -C /dev/gpt
efiboot0 efiboot1 gptboot0 gptboot1
Instead of taking a ZFS device offline, you can also test behavior using a small memory disk (see
mdconfig(8)); I used
mdconfig -at malloc -s 100m
and 1 UFS partition. Once you have the partitions set up on it, you can mount/online and unmount/offline them as desired (assuming they contain mountable filesystems). Don't forget to detach the memory disk once you're finished.
As for having 2
/dev/diskid entries when you have 5 disks, I don't know why that happens since I have set
kern.geom.label.disk_ident.enable to 0 and the only mention of
/dev/diskid I've found is in
glabel(8).