Mounting encrypted ZFS dataset on boot

esprox

New Member
Sep 1, 2024
11
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
 

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!