Other Some GPT labels do not appear inside a BHYVE guest at boot

When I boot FreeBSD 12.1-RELEASE, only the GPT label gpt/boot0 seems to be picked up.
The other 2 GPT labels, namely gpt/root0 and gpt/swap0, are not detected.

Code:
root@nova:~ # gpart list|grep scheme
scheme: GPT

Code:
root@nova:~ # gpart list | grep label
   label: boot0
   label: root0
   label: swap0

Code:
root@nova:~ # glabel status
                                      Name  Status  Components
                                 gpt/boot0     N/A  vtbd0p1
gptid/95ba1d86-a7b4-11ea-96eb-589cfc0c509c     N/A  vtbd0p1

Also, I can not refresh the GPT labels.

Code:
root@nova:~ # glabel refresh /dev/vtbd0
Can't refresh metadata from /dev/vtbd0: Operation not permitted.

In conclusion, I cannot use GPT devices in my /etc/fstab file because only /dev/gpt/boot0 exists...
 
Last edited by a moderator:
I am the Reporter of Bug 247188 - "camcontrol devlist" does not show zvol-backed virtio devices.

I think that #247188 is unrelated.

GPT labels are like msdos labels, they are not a type of disk like SCSI, SATA(AHCI), IDE, SAS, NVMe, NVDIMM, and so on.
 
I Installed a 12.1 p0 system on a USB drive on an EFI system using ufs file system.
First installed without labels added the labels later. They appeared on gpart list, not in /dev/gpt.

Then did a fresh install on an identical configuration. Added the labels in the install configuration menu.
Same result: The labels appear on gpart list, not in /dev/gpt.

Then did a freebsd-update to 12.1 p8.
Same result: The labels appear on gpart list, not in /dev/gpt.

By the way the same is true for glabel labels, only the label of the first slice appears.

Bit of a bummer when booting from an usb disk (no I do not have the ability to use other drive interfaces).

I logged a second bug as this not in bhive. 248857


Update (about 2 hours later after entering the comment


I decided to boot in single user mode and check what was available there.

Code:
# gpart show da1
=>       40  125045344  da1  GPT  (60G)
         40     409600    1  efi  (200M)
     409640  119128064    2  freebsd-ufs  (57G)
  119537704    5507680    3  freebsd-swap  (2.6G)
# gpart list da1 | grep label
label: efi0
label: root0
label: swap0
# ls -al /dev/gpt/
total 2
dr-xr-xr-x 2 root wheel 512 Aug 23 17:02 .
dr-xr-xr-x 17 root wheel 512 Aug 23 17:02 ..
crw-r----- 1 root operator 0x99 Aug 23 17:02 efi0
crw-r----- 1 root operator 0x99 Aug 23 17:02 root0
crw-r----- 1 root operator 0x99 Aug 23 17:02 swap0

When I then exit and continue the boot, the results were.

Code:
[root@atomic04 ~]# gpart show da1
=>       40  125045344  da1  GPT  (60G)
         40     409600    1  efi  (200M)
     409640  119128064    2  freebsd-ufs  (57G)
  119537704    5507680    3  freebsd-swap  (2.6G)
# gpart list da1 | grep label
label: efi0
label: root0
label: swap0
# ls -al /dev/gpt/
total 1
dr-xr-xr-x 2 root wheel 512 Aug 23 17:02 .
dr-xr-xr-x 17 root wheel 512 Aug 23 17:02 ..
crw-r----- 1 root operator 0x99 Aug 23 17:02 efi0

I then decided to byte the bullet and changed /etc/fstab to use the labels. The system booted the results are.

Code:
# gpart list da1 | grep label
label: efi0
label: root0
label: swap0
# ls -al /dev/gpt/
total 2
dr-xr-xr-x 2 root wheel 512 Aug 23 17:02 .
dr-xr-xr-x 17 root wheel 512 Aug 23 17:02 ..
crw-r----- 1 root operator 0x99 Aug 23 17:17 efi0
crw-r----- 1 root operator 0x99 Aug 23 17:17 root0
crw-r----- 1 root operator 0x99 Aug 23 17:17 swap0

My problem is solved.
I don't know if this is designed/desired behavior.
 
Back
Top