You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for this great documentation. However I have an idea to further improve it:
You stated one could use multiple ExecStart= lines to control, which drive's keys should be loaded on boot. You can use systemd templates instead of them. I think this may be easier to manage & debug in the long run.
To use them, you need to:
append an @ at the end of the service's file name like zfs-load-key@.service
use ExecStart=/usr/bin/zfs load-key %i
optionally use Description=Load encryption keys for %i
select which keys you want to load by enabling the services as required: systemctl enable zfs-load-key@my-dataset.service
This supports multiple instances but then uses one instance / service per dataset. If some import fails, systemd will easily indicate which failed to load. All while maintaining a single main configuration file which doesn't need to be edited to enable another dataset.
And if someone wants to import all, one still can use systemctl enable zfs-load-key@-a.service as systemd will then eventually call zfs load-key -a.
The text was updated successfully, but these errors were encountered:
Hey, thanks for this great documentation. However I have an idea to further improve it:
You stated one could use multiple
ExecStart=
lines to control, which drive's keys should be loaded on boot. You can use systemd templates instead of them. I think this may be easier to manage & debug in the long run.To use them, you need to:
@
at the end of the service's file name likezfs-load-key@.service
ExecStart=/usr/bin/zfs load-key %i
Description=Load encryption keys for %i
systemctl enable zfs-load-key@my-dataset.service
This supports multiple instances but then uses one instance / service per dataset. If some import fails, systemd will easily indicate which failed to load. All while maintaining a single main configuration file which doesn't need to be edited to enable another dataset.
And if someone wants to import all, one still can use
systemctl enable zfs-load-key@-a.service
as systemd will then eventually callzfs load-key -a
.The text was updated successfully, but these errors were encountered: