| 1 |
'\" t |
| 2 |
.TH "SYSTEMD\&.AUTOMOUNT" "5" "" "systemd 261~rc3" "systemd.automount" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
systemd.automount \- Automount unit configuration |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
\fIautomount\fR\&.automount |
| 27 |
.SH "DESCRIPTION" |
| 28 |
.PP |
| 29 |
A unit configuration file whose name ends in |
| 30 |
"\&.automount" |
| 31 |
encodes information about a file system automount point controlled and supervised by systemd\&. Automount units may be used to implement on\-demand mounting as well as parallelized mounting of file systems\&. |
| 32 |
.PP |
| 33 |
This man page lists the configuration options specific to this unit type\&. See |
| 34 |
\fBsystemd.unit\fR(5) |
| 35 |
for the common options of all unit configuration files\&. The common configuration items are configured in the generic [Unit] and [Install] sections\&. The automount specific configuration options are configured in the [Automount] section\&. |
| 36 |
.PP |
| 37 |
Automount units must be named after the automount directories they control\&. Example: the automount point |
| 38 |
/home/lennart |
| 39 |
must be configured in a unit file |
| 40 |
home\-lennart\&.automount\&. For details about the escaping logic used to convert a file system path to a unit name see |
| 41 |
\fBsystemd.unit\fR(5)\&. Note that automount units cannot be templated, nor is it possible to add multiple names to an automount unit by creating symlinks to its unit file\&. |
| 42 |
.PP |
| 43 |
For each automount unit file a matching mount unit file (see |
| 44 |
\fBsystemd.mount\fR(5) |
| 45 |
for details) must exist which is activated when the automount path is accessed\&. Example: if an automount unit |
| 46 |
home\-lennart\&.automount |
| 47 |
is active and the user accesses |
| 48 |
/home/lennart |
| 49 |
the mount unit |
| 50 |
home\-lennart\&.mount |
| 51 |
will be activated\&. |
| 52 |
.PP |
| 53 |
Note that automount units are separate from the mount itself, so you should not set |
| 54 |
\fIAfter=\fR |
| 55 |
or |
| 56 |
\fIRequires=\fR |
| 57 |
for mount dependencies here\&. For example, you should not set |
| 58 |
\fIAfter=network\-online\&.target\fR |
| 59 |
or similar on network filesystems\&. Doing so may result in an ordering cycle\&. |
| 60 |
.PP |
| 61 |
Note that automount support on Linux is privileged, automount units are hence only available in the system service manager (and root\*(Aqs user service manager), but not in unprivileged users\*(Aq service managers\&. |
| 62 |
.PP |
| 63 |
Note that automount units should not be nested\&. (The establishment of the inner automount point would unconditionally pin the outer mount point, defeating its purpose\&.) |
| 64 |
.SH "AUTOMATIC DEPENDENCIES" |
| 65 |
.SS "Implicit Dependencies" |
| 66 |
.PP |
| 67 |
The following dependencies are implicitly added: |
| 68 |
.sp |
| 69 |
.RS 4 |
| 70 |
.ie n \{\ |
| 71 |
\h'-04'\(bu\h'+03'\c |
| 72 |
.\} |
| 73 |
.el \{\ |
| 74 |
.sp -1 |
| 75 |
.IP \(bu 2.3 |
| 76 |
.\} |
| 77 |
If an automount unit is beneath another mount unit in the file system hierarchy, a requirement and ordering dependencies are created to the on the unit higher in the hierarchy\&. |
| 78 |
.RE |
| 79 |
.sp |
| 80 |
.RS 4 |
| 81 |
.ie n \{\ |
| 82 |
\h'-04'\(bu\h'+03'\c |
| 83 |
.\} |
| 84 |
.el \{\ |
| 85 |
.sp -1 |
| 86 |
.IP \(bu 2.3 |
| 87 |
.\} |
| 88 |
An implicit |
| 89 |
\fIBefore=\fR |
| 90 |
dependency is created between an automount unit and the mount unit it activates\&. |
| 91 |
.RE |
| 92 |
.SS "Default Dependencies" |
| 93 |
.PP |
| 94 |
The following dependencies are added unless |
| 95 |
\fIDefaultDependencies=no\fR |
| 96 |
is set: |
| 97 |
.sp |
| 98 |
.RS 4 |
| 99 |
.ie n \{\ |
| 100 |
\h'-04'\(bu\h'+03'\c |
| 101 |
.\} |
| 102 |
.el \{\ |
| 103 |
.sp -1 |
| 104 |
.IP \(bu 2.3 |
| 105 |
.\} |
| 106 |
Automount units acquire automatic |
| 107 |
\fIBefore=\fR |
| 108 |
and |
| 109 |
\fIConflicts=\fR |
| 110 |
on |
| 111 |
umount\&.target |
| 112 |
in order to be stopped during shutdown\&. |
| 113 |
.RE |
| 114 |
.sp |
| 115 |
.RS 4 |
| 116 |
.ie n \{\ |
| 117 |
\h'-04'\(bu\h'+03'\c |
| 118 |
.\} |
| 119 |
.el \{\ |
| 120 |
.sp -1 |
| 121 |
.IP \(bu 2.3 |
| 122 |
.\} |
| 123 |
Automount units automatically gain an |
| 124 |
\fIAfter=\fR |
| 125 |
dependency on |
| 126 |
local\-fs\-pre\&.target, and a |
| 127 |
\fIBefore=\fR |
| 128 |
dependency on |
| 129 |
local\-fs\&.target\&. |
| 130 |
.RE |
| 131 |
.SH "FSTAB" |
| 132 |
.PP |
| 133 |
Automount units may either be configured via unit files, or via |
| 134 |
/etc/fstab |
| 135 |
(see |
| 136 |
\fBfstab\fR(5) |
| 137 |
for details)\&. |
| 138 |
.PP |
| 139 |
For details how systemd parses |
| 140 |
/etc/fstab |
| 141 |
see |
| 142 |
\fBsystemd.mount\fR(5)\&. |
| 143 |
.PP |
| 144 |
If an automount point is configured in both |
| 145 |
/etc/fstab |
| 146 |
and a unit file, the configuration in the latter takes precedence\&. |
| 147 |
.SH "OPTIONS" |
| 148 |
.PP |
| 149 |
Automount unit files may include [Unit] and [Install] sections, which are described in |
| 150 |
\fBsystemd.unit\fR(5)\&. |
| 151 |
.PP |
| 152 |
Automount unit files must include an [Automount] section, which carries information about the file system automount points it supervises\&. The options specific to the [Automount] section of automount units are the following: |
| 153 |
.PP |
| 154 |
\fIWhere=\fR |
| 155 |
.RS 4 |
| 156 |
Takes an absolute path of a directory of the automount point\&. If the automount point does not exist at time that the automount point is installed, it is created\&. This string must be reflected in the unit filename\&. (See above\&.) This option is mandatory\&. |
| 157 |
.RE |
| 158 |
.PP |
| 159 |
\fIExtraOptions=\fR |
| 160 |
.RS 4 |
| 161 |
Extra mount options to use when creating the autofs mountpoint\&. This takes a comma\-separated list of options\&. This setting is optional\&. Note that the usual specifier expansion is applied to this setting, literal percent characters should hence be written as |
| 162 |
"%%"\&. |
| 163 |
.sp |
| 164 |
Added in version 250\&. |
| 165 |
.RE |
| 166 |
.PP |
| 167 |
\fIDirectoryMode=\fR |
| 168 |
.RS 4 |
| 169 |
Directories of automount points (and any parent directories) are automatically created if needed\&. This option specifies the file system access mode used when creating these directories\&. Takes an access mode in octal notation\&. Defaults to 0755\&. |
| 170 |
.RE |
| 171 |
.PP |
| 172 |
\fITimeoutIdleSec=\fR |
| 173 |
.RS 4 |
| 174 |
Configures an idle timeout\&. Once the mount has been idle for the specified time, systemd will attempt to unmount\&. Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass 0 to disable the timeout logic\&. The timeout is disabled by default\&. |
| 175 |
.sp |
| 176 |
Added in version 220\&. |
| 177 |
.RE |
| 178 |
.PP |
| 179 |
Check |
| 180 |
\fBsystemd.unit\fR(5), |
| 181 |
\fBsystemd.exec\fR(5), and |
| 182 |
\fBsystemd.kill\fR(5) |
| 183 |
for more settings\&. |
| 184 |
.SH "SEE ALSO" |
| 185 |
.PP |
| 186 |
\fBsystemd\fR(1), \fBsystemctl\fR(1), \fBsystemd.unit\fR(5), \fBsystemd.mount\fR(5), \fBmount\fR(8), \fBautomount\fR(8), \fBsystemd.directives\fR(7) |