I would like to make sure that a ZFS mountpoint is available before service managed by
systemd starts. Therefore I'd use the
After= stanza in the
systemd unit. But, what to write as argument?
I'm using a local installation of ZFS because of ongoing performance issues with the shipped version and import the only pool with
[Unit] Description=ZFS pool import for source installations of ZFS After=local-fs.target [Service] Type=oneshot ExecStart=/usr/local/sbin/zpool import -d /dev data [Install] WantedBy=multi-user.target
because I never found any useful documentation of
systemd support on Ubuntu and it seems to be targeted by devs only now.
However, on another system I also experience trouble with the built-in resources, e.g.
zfs-mount.service is loaded and running even if no pools are imported and thus no mounts could have been successful.
Is there a target that I can make my services depend on in order to start only after the mountpoint is available and refuse to start if the whole ZFS or just the mountpoint failed to initialize (and that I could copy for my local installation)?
I'm using Ubuntu 17.10.