Unable to access GPT disk partitions - No such file or directory

From: Guy Helmer <guy.helmer_at_gmail.com>
Date: Wed, 13 Sep 2023 13:02:10 UTC
Hi, looking for some advice to get some data back.

I've had a FreeBSD 13 system (upgraded over the years from several previous versions) on a VMware ESXi server suddenly loose access to its UFS filesystems. 

I cloned the disk image in the VMware server and have attached it to another FreeBSD 13 virtual machine to try to recover access to the data (I have old backups on a separate ZFS filesystem, but I'd sure like to recover the current filesystem). There are no kernel messages about problems with the virtual disk other than the expected boot messages:

da2 at mpt0 bus 0 scbus2 target 2 lun 0
da2: <VMware Virtual disk 1.0> Fixed Direct Access SCSI-2 device
da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
da2: Command Queueing enabled
da2: 81920MB (167772160 512 byte sectors)
da2: quirks=0x140<RETRY_BUSY,STRICT_UNMAP>

gpart shows its info:

$ sudo gpart list da2
Geom name: da2
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 167772126
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da2p1
   Mediasize: 262144 (256K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   efimedia: HD(1,GPT,76c936da-f200-11e4-b749-000c29d7feb4,0x28,0x200)
   rawuuid: 76c936da-f200-11e4-b749-000c29d7feb4
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: gpboot1
   length: 262144
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 551
   start: 40
2. Name: da2p2
   Mediasize: 4294967296 (4.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   efimedia: HD(2,GPT,954100b0-f200-11e4-b749-000c29d7feb4,0x800,0x800000)
   rawuuid: 954100b0-f200-11e4-b749-000c29d7feb4
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: gprootfs1
   length: 4294967296
   offset: 1048576
   type: freebsd-ufs
   index: 2
   end: 8390655
   start: 2048
3. Name: da2p3
   Mediasize: 4294967296 (4.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   efimedia: HD(3,GPT,a2ed8c2e-f200-11e4-b749-000c29d7feb4,0x800800,0x800000)
   rawuuid: a2ed8c2e-f200-11e4-b749-000c29d7feb4
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: gpswap1
   length: 4294967296
   offset: 4296015872
   type: freebsd-swap
   index: 3
   end: 16779263
   start: 8390656
4. Name: da2p4
   Mediasize: 77308345856 (72G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   efimedia: HD(4,GPT,a84afad7-f200-11e4-b749-000c29d7feb4,0x1000800,0x8fff7df)
   rawuuid: a84afad7-f200-11e4-b749-000c29d7feb4
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: gpusrfs1
   length: 77308345856
   offset: 8590983168
   type: freebsd-ufs
   index: 4
   end: 167772126
   start: 16779264
Consumers:
1. Name: da2
   Mediasize: 85899345920 (80G)
   Sectorsize: 512
   Mode: r0w0e0

The /dev entries look OK to me:
$ ls -l /dev/da2*
crw-r-----  1 root  operator  0x66 Sep 13 14:01 /dev/da2
crw-r-----  1 root  operator  0x6c Sep 13 14:01 /dev/da2p1
crw-r-----  1 root  operator  0x6d Sep 13 14:01 /dev/da2p2
crw-r-----  1 root  operator  0x6e Sep 13 14:01 /dev/da2p3
crw-r-----  1 root  operator  0x6f Sep 13 14:01 /dev/da2p4
$ ls -l /dev/gpt/
total 0
crw-r-----  1 root  operator  0x75 Sep 13 14:01 gpboot1
crw-r-----  1 root  operator  0x77 Sep 13 14:01 gprootfs1
crw-r-----  1 root  operator  0x79 Sep 13 14:01 gpswap1
crw-r-----  1 root  operator  0x7b Sep 13 14:01 gpusrfs1

However, any attempt to access the /dev entries fails with "No such file or directory":

$ sudo fsck /dev/da2p2
Can't open /dev/da2p2: No such file or directory
$ sudo fsck /dev/da2p4
Can't open /dev/da2p4: No such file or directory
$ sudo fsck /dev/gpt/gprootfs1 
Can't open /dev/gpt/gprootfs1: No such file or directory
$ sudo fsck /dev/gpt/gpusrfs1 
Can't open /dev/gpt/gpusrfs1: No such file or directory

I've never had an issue like this before and I can't find anything using Google searches that resolves access to these disk devices. Any ideas?

Thanks,
Guy Helmer, Ph.D.