Browse Source

Add mount for ZFS and zfs-load-key unit file

lxd10
Benoît S. 9 months ago
parent
commit
2b87d50a1d
  1. 13
      files/zfs-load-key.service
  2. 6
      setup-zfs-and-lxd.py

13
files/zfs-load-key.service

@ -0,0 +1,13 @@
[Unit]
Description=Load encryption keys
DefaultDependencies=no
After=zfs-import.target
Before=zfs-mount.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/zfs load-key -a
[Install]
WantedBy=zfs-mount.service

6
setup-zfs-and-lxd.py

@ -105,3 +105,9 @@ if not host.fact.command('zfs list | grep exports || true'):
name='Create ZFS volume exports',
commands=['zfs create local/exports -o mountpoint=/var/backups/lxd']
)
server.shell(
name='Mount local/exports',
commands=['zfs mount local/exports'],
)
Loading…
Cancel
Save