]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs-mount-generator.8.in
Disable 'zfs remap' command
[mirror_zfs.git] / man / man8 / zfs-mount-generator.8.in
CommitLineData
55d80e65
AR
1.TH "ZFS\-MOUNT\-GENERATOR" "8" "ZFS" "zfs-mount-generator" "\""
2.SH "NAME"
68fded81 3zfs\-mount\-generator \- generates systemd mount units for ZFS
55d80e65
AR
4.SH SYNOPSIS
5.B /lib/systemd/system-generators/zfs\-mount\-generator
6.sp
7.SH DESCRIPTION
68fded81 8zfs\-mount\-generator implements the \fBGenerators Specification\fP
55d80e65
AR
9of
10.BR systemd (1),
11and is called during early boot to generate
12.BR systemd.mount (5)
13units for automatically mounted datasets. Mount ordering and dependencies
14are created for all tracked pools (see below). If a dataset has
15.BR canmount=on
16and
17.BR mountpoint
18set, the
19.BR auto
20mount option will be set, and a dependency for
21.BR local-fs.target
22on the mount will be created.
23
24Because zfs pools may not be available very early in the boot process,
25information on ZFS mountpoints must be stored separately. The output
26of the command
27.PP
28.RS 4
68fded81 29zfs list -H -o name,mountpoint,canmount,atime,relatime,devices,exec,readonly,setuid,nbmand
55d80e65
AR
30.RE
31.PP
32for datasets that should be mounted by systemd, should be kept
33separate from the pool, at
34.PP
35.RS 4
36.RI @sysconfdir@/zfs/zfs-list.cache/ POOLNAME
37.
38.RE
39.PP
40The cache file, if writeable, will be kept synchronized with the pool
41state by the ZEDLET
42.PP
43.RS 4
44history_event-zfs-list-cacher.sh .
45.RE
46.PP
47.sp
68fded81
AR
48.SH EXAMPLE
49To begin, enable tracking for the pool:
50.PP
51.RS 4
52touch
53.RI @sysconfdir@/zfs/zfs-list.cache/ POOLNAME
54.RE
55.PP
56Then, enable the tracking ZEDLET:
57.PP
58.RS 4
39042f97 59ln -s "@zfsexecdir@/zed.d/history_event-zfs-list-cacher.sh" "@sysconfdir@/zfs/zed.d"
68fded81
AR
60
61systemctl enable zed.service
62
63systemctl restart zed.service
64.RE
65.PP
66Force the running of the ZEDLET by setting canmount=on for at least one dataset in the pool:
67.PP
68.RS 4
69zfs set canmount=on
70.I DATASET
71.RE
72.PP
73This forces an update to the stale cache file.
74.sp
55d80e65
AR
75.SH SEE ALSO
76.BR zfs (5)
77.BR zfs-events (5)
78.BR zed (8)
79.BR zpool (5)
80.BR systemd (1)
81.BR systemd.target (5)
82.BR systemd.special (7)
83.BR systemd.mount (7)