Mounting encrypted ZFS dataset on boot

esprox

New Member
Sep 1, 2024
14
1
3
I have an encrypted dataset which contains resources Proxmox needs (e.g. vm storage).
The passphrase is in /etc/zfs/datasetname.phrase and that path is stored in zfs keylocation

It gets properly mounted when I zfs mount -a -l without me needing to enter the passphrase.

This is not the boot partition.

However, after boot, the dataset is not mounted and I have to mount it manually. I can't find any log messages related to this. canmount is on.

What's the best way to ensure the dataset is mounted when Proxmox comes up? The boot disk is ext4 with luks encryption, so the passphrase should be available at boot when zfs mounts things. It's set with chmod 600 and displayed with -rw-------. I think zfs is run by root but maybe it's different in Proxmox? Version is zfs-2.2.4-pve1