Dies ist eine alte Version des Dokuments!


Linux ZFS Verschlüsselung

Hauseigenes Apt-Repo: https://apt.iteas.at

FIXME

https://github.com/zfsonlinux/zfs/issues/8762
https://docs.oracle.com/cd/E37838_01/html/E61017/gkkih.html
https://wiki.archlinux.org/index.php/ZFS#Native_encryption
https://docs.oracle.com/cd/E36784_01/html/E36835/gkkuc.html#scrolltoc

zfs create tank01/test1 -o encryption=on -o  keyformat=passphrase
zfs create -V 520g v-machines/iscsi/vm-202-disk-2-encrypted -o encryption=on -o  keyformat=passphrase
man zfs

encryption=on  keyformat=raw|hex|passphrase keylocation=prompt|file://</absolute/file/path>

Einbinden aller verschlüsselten Dateisysteme nach einem Reboot:

zfs mount -l -a

Ein unverschlüsseltes Dataset, kann nicht unter einem verschlüsselten Dataset verschoben werden (rename).

Ältere Versionen von Proxmox verwenden noch Grub als Bootloader. Legt man in dieser Konfiguration ein verschlüsseltes Dataset im Rpool an, funktioniert dies auch und man merkt nichts böses. Nach einem Reboot der Maschine findet Grub das Bootdevice/Storage nicht mehr. Die Fehlermeldung ist alles andere als Aussagekräftig. Sollte dies passieren genügt es das verschlüsselte Dataset mit einer Liveiso (Empfehlung Proxmox - bootet in ca. 5 Minuten auch übers Internet IPMI/IDRAC/ILO) zu löschen, dann bootet der Server wieder normal.

Im GIT sieht man die unterstützen Features von Grub: http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/fs/zfs/zfs.c#n276

Benötigt man dieses Feature, muss auf das Proxmox-Boot-Tool umgestellt werden. https://pve.proxmox.com/wiki/ZFS:_Switch_Legacy-Boot_to_Proxmox_Boot_Tool

Sollte die Installation aber so alt sein, das die 512MB Partition auf den HDD's des Rpool's fehlen, dann funktioniert das nicht und eine Neuinstallation des Servers ist notwendig.

FIXME

https://forum.proxmox.com/threads/thema-verschl%C3%BCsselung-von-vm-dateien-und-backups.119784/#post-520128

nano nano /usr/share/perl5/PVE/Storage/ZFSPoolPlugin.pm
 
- my $cmd = ['zfs', 'send', '-Rpv'];
+ my $cmd = ['zfs', 'send', '-Rpvw'];