Solved zfs snapshots of vm zpool?

I am working with a bhyve vm which is configured to have a zvol as its backing store. Thus:

Code:
zroot/vm/vhp3k-10                               18.3G  4.01T   202K  /zroot/vm/vhp3k-10
zroot/vm/vhp3k-10/disk0                         18.3G  4.01T  18.0G  -

The question I have is: What is the appropriate technique to ensure backups (snapshots) of this vm and its disc storage?

I use zfsnap to regularly snapshot various file systems but I cannot see how this applies to block devices.

Apparently I get the snapshots. I just did not know how to look for them:
Code:
# zfs list -t all -ro name,space,compressratio,quota,refquota,reservation,refreservation  zroot/vm/vhp3k-10/disk0
NAME                                             NAME                                             AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD  RATIO  QUOTA  REFQUOTA  RESERV  REFRESERV
zroot/vm/vhp3k-10/disk0                          zroot/vm/vhp3k-10/disk0                          4.01T  18.3G      328M   18.0G              0          0  1.67x      -         -    none       none
zroot/vm/vhp3k-10/disk0@2022-11-16_02.00.00--6w  zroot/vm/vhp3k-10/disk0@2022-11-16_02.00.00--6w      -  89.4M         -       -              -          -  1.61x      -         -       -          -
zroot/vm/vhp3k-10/disk0@2022-11-17_02.00.00--6w  zroot/vm/vhp3k-10/disk0@2022-11-17_02.00.00--6w      -  16.2M         -       -              -          -  1.70x      -         -       -          -
 
Disclaimer: I've not done this so take this as my opinion (based on memory) and a starting point for further research.
My understanding of zfs block devices used like this have a few different modes, one is visible to the host, one is invisible to the host (I don't recall the exact terms for it).
If the block dev is visible to the host you should be able to just treat it as a normal dataset for snapshots
 
Back
Top