Other Why isn't my swap and zfs partitions not showing in /dev/gpt?

Here are my partitions, all labeled:

Code:
$ gpart show -l ada0
=>     40  134217648  ada0  GPT            (64G)
       40            1024     1  gptboot1  (512K)
      1064            984        - free -  (492K)
      2048        8388608     2  swap1     (4.0G)
   8390656      125827032     3  zfs1      (60G)

But if I list the contents in /dev/gpt there is only the first partition in there

Code:
 ls -l /dev/gpt           
total 0
crw-r-----  1 root operator 0x5d Mar 20 00:40 gptboot1
 
Did you use /dev/ada0p2 in fstab for swap? That would hide the label of the filesystem. There are a couple of sysctls set by default that influence this behavior.

In loader.conf:
Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
You can remove those if you want. But this could result in gpart(8) showing disks twice, once as ada0 and once as its GPTID.

Code:
dice@molly:~ % sysctl -d kern.geom.label.disk_ident.enable
kern.geom.label.disk_ident.enable: Create device nodes for drives which export a disk identification string
dice@molly:~ % sysctl -d kern.geom.label.gptid.enable
kern.geom.label.gptid.enable: Create device nodes for GPT UUIDs
 
Yes the infamous GEOM withering.
cat /etc/fstab to see how swap is defined
zpool status to see what is used to mount the zpool.
A quick check all the possible ways are enabled by default.
sysctl -a | grep kern.geom.label
 
Did you use /dev/ada0p2 in fstab for swap? That would hide the label of the filesystem.
Yes I have that in my /etc/fstab! So if I change it to /dev/gpt/swap1 will also work and I should see swap1 in my
/dev/gpt directory?
 
Back
Top