ZFS Access data stored inside a Windows formatted iscsi volume

I'm currently testing out using ctld to export some ZFS volumes to Windows clients.

It appears fairly straight forward to export the volume via ctld and partition/format the disk on Windows. Just using my Windows 10 machine as a test I initialised a 1TB disk using GPT and created a single NTFS partition.

I was hoping that changing the volmode from dev to full would allow me to see the partitions in FreeBSD. I may not need to ever do this but it's reassuring to know that I could possibly mount the data r/o in FreeBSD in a pinch to pull data off. (Another option would be to connect the target to another Windows system on the assumption that it would correctly identify and mount the partitions created in the original Windows machine)

However, I don't seem to be able to find a way to access the NTFS partition in FreeBSD. Using gpart on /dev/zvol/nas/iscsi/test tells me that there is 'no such geom'. Using fdisk appears to pull some information from the disk (included below), but no partitions or other devices are exposed via /dev that I can see could be used to access the data in an emergency.

Does anyone know if it's possible for me to get access to the file systems on this volume via FreeBSD?

The fdisk output below seems to find a partition that has been created but I can't see any way of getting FreeBSD to access the contained GPT partition.
It also seems to show a size that is twice the actual partition size (ZFS/ctladm/Windows all show the volume as 1TB)

Block sizes are the default of 8k on the ZFS volume and 512b in ctld if that's of any relevance.
I did originally plan to reduce the volume block size but ZFS complained about using anything less that 8k so I left it as default.

Code:
******* Working on device /dev/zvol/nas/iscsi/test *******
parameters extracted from in-core disklabel are:
cylinders=133674 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=133674 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 238 (0xee),(EFI GPT)
    start 1, size 4294967295 (2097151 Meg), flag 0
        beg: cyl 0/ head 0/ sector 2;
        end: cyl 553/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
 
I've used zvol via fibrechannel as steam storage many years ago and still have that zvol on my server. It was also initialized by the client (FreeBSD) with a GPT table and zfs, that's also what is visible on the server:

Code:
# gpart show /dev/zvol/storage/fctgt/steam-fc
=>        34  1572863933  zvol/storage/fctgt/steam-fc  GPT  (750G)
          34        2014                               - free -  (1.0M)
        2048  1572861919                            1  freebsd-zfs  (750G)

Given that I regularly receive various USB-drives "partitioned and/or formatted on windows" that neither have any usable partition table nor any filesystem headers that might be picked up by fstyp(8), I suspect windows has done some non-standard stuff to the drives to prevent it being used on other systems ("for security reasons" of course...)
First guess: that annoying auto-encryption Win 10 engages if you don't explicitly stop and disable it fast enough.
 
Sorry, ignore me I'm being dumb.

I compared it to a FreeBSD created GPT disk and the GPT header format was exactly the same and in the same place on the disk so there was no reason for gpart to not pick it up.

Eventually I realised that nothing else can access the disk when the kernel ctl subsystem is using it.

As soon as I stopped ctld I was able to run gpart and 3 partition devices appeared. Within about 3 minutes I had ntfs-3g installed and the disk successfully mounted read only.

Code:
 # gpart show /dev/zvol/nas/iscsi/test
=>        34  2147483581  zvol/nas/iscsi/test  GPT  (1.0T)
          34        2048                    1  ms-ldm-metadata  (1.0M)
        2082       30686                    2  ms-reserved  (15M)
       32768  2147450847                    3  ms-ldm-data  (1.0T)
#
# ntfs-3g -o ro /dev/zvol/nas/iscsi/testp3 /mnt
# ls /mnt
$RECYCLE.BIN                            System Volume Information               Installer_5.5.15.exe         backup.pst
 
Back
Top