aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorAntonio Russo <[email protected]>2018-04-06 17:11:09 -0400
committerBrian Behlendorf <[email protected]>2018-04-06 14:11:09 -0700
commit55d80e651a8c19919b8ee6a1c05fb36ad97ab5ad (patch)
tree10250074931531d3b32418dc8780fafbc122f0f5 /man
parent5c27ec10889d3d8f12d59fb7e5068ed2d8697c85 (diff)
systemd mount generator and tracking ZEDLET
zfs-mount-generator implements the "systemd generator" protocol, producing systemd.mount units from the cached outputs of zfs list, during early boot, integrating with systemd. Each pool has an indpendent cache of the command zfs list -H -oname,mountpoint,canmount -tfilesystem -r $pool which is kept synchronized by the ZEDLET history_event-zfs-list-cacher.sh Datasets not in the cache will be loaded later in the boot process by zfs-mount.service, including pools without a cache. Among other things, this allows for complex mount hierarchies. Reviewed-by: Fabian Grünbichler <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #7329
Diffstat (limited to 'man')
-rw-r--r--man/man8/Makefile.am1
-rw-r--r--man/man8/zfs-mount-generator.856
2 files changed, 57 insertions, 0 deletions
diff --git a/man/man8/Makefile.am b/man/man8/Makefile.am
index 5c60bdfa7..b6408ddf2 100644
--- a/man/man8/Makefile.am
+++ b/man/man8/Makefile.am
@@ -4,6 +4,7 @@ dist_man_MANS = \
vdev_id.8 \
zdb.8 \
zfs.8 \
+ zfs-mount-generator.8 \
zfs-program.8 \
zgenhostid.8 \
zinject.8 \
diff --git a/man/man8/zfs-mount-generator.8 b/man/man8/zfs-mount-generator.8
new file mode 100644
index 000000000..af471e7c9
--- /dev/null
+++ b/man/man8/zfs-mount-generator.8
@@ -0,0 +1,56 @@
+.TH "ZFS\-MOUNT\-GENERATOR" "8" "ZFS" "zfs-mount-generator" "\""
+.SH "NAME"
+zfs\-mount\-generator \- generates systemd mount units for zfs
+.SH SYNOPSIS
+.B /lib/systemd/system-generators/zfs\-mount\-generator
+.sp
+.SH DESCRIPTION
+The zfs\-mount\-generator implements the \fBGenerators Specification\fP
+of
+.BR systemd (1),
+and is called during early boot to generate
+.BR systemd.mount (5)
+units for automatically mounted datasets. Mount ordering and dependencies
+are created for all tracked pools (see below). If a dataset has
+.BR canmount=on
+and
+.BR mountpoint
+set, the
+.BR auto
+mount option will be set, and a dependency for
+.BR local-fs.target
+on the mount will be created.
+
+Because zfs pools may not be available very early in the boot process,
+information on ZFS mountpoints must be stored separately. The output
+of the command
+.PP
+.RS 4
+zfs list -H -oname,mountpoint,canmount
+.RE
+.PP
+for datasets that should be mounted by systemd, should be kept
+separate from the pool, at
+.PP
+.RS 4
+.RI @sysconfdir@/zfs/zfs-list.cache/ POOLNAME
+.
+.RE
+.PP
+The cache file, if writeable, will be kept synchronized with the pool
+state by the ZEDLET
+.PP
+.RS 4
+history_event-zfs-list-cacher.sh .
+.RE
+.PP
+.sp
+.SH SEE ALSO
+.BR zfs (5)
+.BR zfs-events (5)
+.BR zed (8)
+.BR zpool (5)
+.BR systemd (1)
+.BR systemd.target (5)
+.BR systemd.special (7)
+.BR systemd.mount (7)