Zfs native encryption: difference in snapshots mounted vs unmounted?

janssensm

Renowned Member
Dec 18, 2016
266
116
83
Since a while one of my pve hosts runs a zfs dataset with native encryption and did not have any issues so far.
I've not implemented automatic loading of the key for the encrypted dataset so if the host is booted I will have to supply it myself.

Now I was testing snapshots on this dataset and it seems to work fine.
However when I was monitoring if data is counted in the zfs snapshot stats, I saw when doing a zfs list -t snapshot, a difference appears when snapshotting a vm using this storage if its mounted or unmounted.

Snapshot on unmounted encrypted dataset:
Off course before starting the vm, first mount the dataset supplying the key, then starting the vm.
USED and REFER stats stay the same, even when changes are made inside the vm.

Snapshot on mounted encrypted dataset:
Start the VM.
USED and REFER stats are increasing.

I wondered if this difference could cause any issues.

Snapshots were done in the web gui, but that probably doesn't matter.
pveversion: pve-manager/7.4-3/9002ab8a (running kernel: 6.2.9-1-pve)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!