[pve-devel] [RFC zfsonlinux 1/1] Add systemd-unit for importing specific pools

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Sep 29 05:54:19 CEST 2020


On 16.09.20 14:14, Stoiko Ivanov wrote:
> [ --8<-- snip --8<-- ]
> +diff --git a/etc/systemd/system/zfs-import at .service.in b/etc/systemd/system/zfs-import at .service.in
> +new file mode 100644
> +index 000000000..2db9fdaab
> +--- /dev/null
> ++++ b/etc/systemd/system/zfs-import at .service.in
> +@@ -0,0 +1,17 @@
> ++[Unit]
> ++Description=Import ZFS pool %i
> ++Documentation=man:zpool(8)
> ++DefaultDependencies=no
> ++Requires=systemd-udev-settle.service

The after below can be OK, but why the require??

"Using this service is not recommended. [...]"
-- https://www.freedesktop.org/software/systemd/man/systemd-udev-settle.service.html

> ++After=systemd-udev-settle.service
> ++After=cryptsetup.target
> ++After=multipathd.target
> ++Before=zfs-import.target
> ++
> ++[Service]
> ++Type=oneshot
> ++RemainAfterExit=yes
> ++ExecStart=@sbindir@/zpool import -N -d /dev/disk/by-id -o cachefile=none %I
> ++
> ++[Install]
> ++WantedBy=zfs-import.target






More information about the pve-devel mailing list