Hi,
As far as I see there is no build in option to unlock ZFS pools at boot.
I found several way to unlock the pools using systemd scriptsbut I'm not sure If they would work as I think.
1.) There is systemd script that oneshots between "Before=zfs-mount.service" and "After=zfs-import.target" to load a key file. This is only usefull if the key is stored on a place already encrypted, which is in my case only the NAS. Is it possible to load the key file from a SMB/NFS share mounted to ProxmoxVE or are network shares mounted after "zfs-import.target" is run so the key files aren't ready at that point to unlock the key.
2.) I also found a script that doesn't load a key file to unlock the pool, but asks the user to input the passphrase. Is it possible to to just pause the initialization of linux until the correct passphrase is typed in? I could use the IPMI to VNC into the system to type in the password but that would be a bit annoying, because there is no shared clipboard so I would have to type it all in myself and short/easy passwords would be useless.
How do you unlock your pools?
As far as I see there is no build in option to unlock ZFS pools at boot.
I found several way to unlock the pools using systemd scriptsbut I'm not sure If they would work as I think.
1.) There is systemd script that oneshots between "Before=zfs-mount.service" and "After=zfs-import.target" to load a key file. This is only usefull if the key is stored on a place already encrypted, which is in my case only the NAS. Is it possible to load the key file from a SMB/NFS share mounted to ProxmoxVE or are network shares mounted after "zfs-import.target" is run so the key files aren't ready at that point to unlock the key.
2.) I also found a script that doesn't load a key file to unlock the pool, but asks the user to input the passphrase. Is it possible to to just pause the initialization of linux until the correct passphrase is typed in? I could use the IPMI to VNC into the system to type in the password but that would be a bit annoying, because there is no shared clipboard so I would have to type it all in myself and short/easy passwords would be useless.
How do you unlock your pools?