Last active
August 7, 2024 18:46
-
-
Save wrouesnel/62fae4421a4faa4b4e86 to your computer and use it in GitHub Desktop.
systemd unit files for ZFS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=ZFS Event Daemon (zed) | |
Documentation=man:zed(8) | |
After=zfs-import-cache.service | |
After=zfs-import-scan.service | |
[Service] | |
Type=forking | |
ExecStart=/sbin/zed | |
PIDFile=/run/zed.pid | |
User=root | |
Group=root | |
Restart=on-abort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Import ZFS pools by cache file | |
DefaultDependencies=no | |
Requires=systemd-udev-settle.service | |
After=systemd-udev-settle.service | |
ConditionPathExists=/etc/zfs/zpool.cache | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/zpool import -c /etc/zfs/zpool.cache -aN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Import ZFS pools by device scanning | |
DefaultDependencies=no | |
Requires=systemd-udev-settle.service | |
After=systemd-udev-settle.service | |
ConditionPathExists=!/zfs/zpool.cache | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/zpool import -d /dev/disk/by-id -aN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Mount ZFS filesystems | |
DefaultDependencies=no | |
Wants=zfs-import-cache.service | |
Wants=zfs-import-scan.service | |
Requires=systemd-udev-settle.service | |
After=systemd-udev-settle.service | |
After=zfs-import-cache.service | |
After=zfs-import-scan.service | |
Before=local-fs.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/zfs mount -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=ZFS startup target | |
Requires=zfs-mount.service | |
Requires=zfs-share.service | |
Wants=zed.service | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment