Add mount for ZFS and zfs-load-key unit file
This commit is contained in:
parent
d995cfc671
commit
2b87d50a1d
2 changed files with 19 additions and 0 deletions
13
files/zfs-load-key.service
Normal file
13
files/zfs-load-key.service
Normal file
|
@ -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
|
|
@ -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'],
|
||||
)
|
||||
|
||||
|
|
Reference in a new issue