siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.38k stars 514 forks source link

ZFS auto load key and mount datasets #8847

Open runningman84 opened 3 months ago

runningman84 commented 3 months ago

Feature Request

It would be great if the zfs importer service would also call zfs load-key -a in order to load all keys from the disk (which could be stored for example in /var/keyname.key). Furthermore it should also autmount the datasets using zfs mount.

Description

Right now it is difficult to deal with zfs in talos because some commands can only be executed in some privileged pod. At this point it is already too late in the boot process and some other pods might crash because they cannot access the data.

Reference docs

https://arstechnica.com/gadgets/2021/06/a-quick-start-guide-to-openzfs-native-encryption/ https://wiki.archlinux.org/title/ZFS#Unlock_at_boot_time:_systemd

runningman84 commented 3 months ago

This should do the trick https://github.com/siderolabs/extensions/pull/400