]> git.proxmox.com Git - mirror_zfs.git/commit
Add systemd unit files for ZFS startup
authorRalf Ertzinger <ralf@skytale.net>
Sun, 19 Jan 2014 14:36:49 +0000 (15:36 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 5 Feb 2014 20:25:30 +0000 (12:25 -0800)
commit881f45c6a8f44486f76c4713ecef0d533d6601e8
treec16967ad7be5fc917b7052a23fbc8020bf07cafd
parentc5cb66addcb947ae8843c40c6db134ccd821adb7
Add systemd unit files for ZFS startup

This adds systemd unit files replacing the functionality offered by
the SysV init script found in etc/init.d.

It has been developed and tested on Fedora 19, Fedora 20
and openSuSE 13.1.

Four unit files and one target are offered.

zfs-import-cache.service:
    Import pools from /etc/zfs/zpool.cache. This unit will wait for
    udev to settle.
zfs-import-scan.service:
    Import pools by scanning /dev/disk/by-id for zvols. This unit will
    only run if /etc/zfs/zpool.cache is not present. This unit will wait
    for udev to settle
zfs-mount.service:
    Mount ZFS native filesystems. It contains a dependency to be loaded
    before local-fs.target.
zfs-share.service:
    Share NFS/SMB filesystems. This unit contains a dependency that
    will cause it to be restarted whenever the smb or nfs-server unit
    is restarted, restoring the shares added.
zfs.target:
    This target pulls in the other units in order to start ZFS. It's
    the only unit that can be enabled/disabled, all other services
    are static and pulled in by dependencies. It will honour zfs=off
    and zfs=no options on the kernel command line.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2108
18 files changed:
config/user-systemd.m4 [new file with mode: 0644]
config/user-sysvinit.m4 [new file with mode: 0644]
config/user.m4
configure.ac
etc/Makefile.am
etc/modules-load.d/.gitignore [new file with mode: 0644]
etc/modules-load.d/Makefile.am [new file with mode: 0644]
etc/modules-load.d/zfs.conf.in [new file with mode: 0644]
etc/systemd/Makefile.am [new file with mode: 0644]
etc/systemd/system/.gitignore [new file with mode: 0644]
etc/systemd/system/50-zfs.preset.in [new file with mode: 0644]
etc/systemd/system/Makefile.am [new file with mode: 0644]
etc/systemd/system/zfs-import-cache.service.in [new file with mode: 0644]
etc/systemd/system/zfs-import-scan.service.in [new file with mode: 0644]
etc/systemd/system/zfs-mount.service.in [new file with mode: 0644]
etc/systemd/system/zfs-share.service.in [new file with mode: 0644]
etc/systemd/system/zfs.target.in [new file with mode: 0644]
rpm/generic/zfs.spec.in