Recommended way to install proxmox on ZFS with encryption with autodecryption


This is somehow overkill, it works with keyscripts, e.g.:

Code:
# this does not work (in initramfs):
# sdb1_crypt UUID=65fce98c-7240-4495-9622-f334c8b79c57 /boot/my.key luks

# but this does
sdb1_crypt UUID=9dc95441-91f0-4614-85eb-ee152b1a9cfc none discard,luks,keyscript=/boot/luks/ppscript.sh

Now of course if all you want to do is echo / cat another file within the script, up to you.

EDIT: ok i've added initramfs option to both crypttab entries and this time both drives are decrypted at initramfs stage. I didn't know about this option, i must read about it more.

This is should not be necessary. Maybe you ran into this?
https://unix.stackexchange.com/a/736089

EDIT2: Ok it seems like BTRFS need special kernel parameter to behave such way. Which is somewhat reasonable ...
https://forum.proxmox.com/threads/btrfs-raid1-totally-useless.124075/

This is the same for mdadm. I personally prefer (with a regular machine) not to boot on a degraded array automatically - it forces you to act. It's a recovery situation in my view, handled manually.
 

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!