summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man5/systemd.automount.5
blob: 1ba25d779ea0c2fd5f891dce28051015007716f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
'\" t
.TH "SYSTEMD\&.AUTOMOUNT" "5" "" "systemd 256~rc3" "systemd.automount"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd.automount \- Automount unit configuration
.SH "SYNOPSIS"
.PP
\fIautomount\fR\&.automount
.SH "DESCRIPTION"
.PP
A unit configuration file whose name ends in
"\&.automount"
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\&.
.PP
This man page lists the configuration options specific to this unit type\&. See
\fBsystemd.unit\fR(5)
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\&.
.PP
Automount units must be named after the automount directories they control\&. Example: the automount point
/home/lennart
must be configured in a unit file
home\-lennart\&.automount\&. For details about the escaping logic used to convert a file system path to a unit name see
\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\&.
.PP
For each automount unit file a matching mount unit file (see
\fBsystemd.mount\fR(5)
for details) must exist which is activated when the automount path is accessed\&. Example: if an automount unit
home\-lennart\&.automount
is active and the user accesses
/home/lennart
the mount unit
home\-lennart\&.mount
will be activated\&.
.PP
Note that automount units are separate from the mount itself, so you should not set
\fIAfter=\fR
or
\fIRequires=\fR
for mount dependencies here\&. For example, you should not set
\fIAfter=network\-online\&.target\fR
or similar on network filesystems\&. Doing so may result in an ordering cycle\&.
.PP
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\&.
.PP
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\&.)
.SH "AUTOMATIC DEPENDENCIES"
.SS "Implicit Dependencies"
.PP
The following dependencies are implicitly added:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
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\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
An implicit
\fIBefore=\fR
dependency is created between an automount unit and the mount unit it activates\&.
.RE
.SS "Default Dependencies"
.PP
The following dependencies are added unless
\fIDefaultDependencies=no\fR
is set:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Automount units acquire automatic
\fIBefore=\fR
and
\fIConflicts=\fR
on
umount\&.target
in order to be stopped during shutdown\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Automount units automatically gain an
\fIAfter=\fR
dependency on
local\-fs\-pre\&.target, and a
\fIBefore=\fR
dependency on
local\-fs\&.target\&.
.RE
.SH "FSTAB"
.PP
Automount units may either be configured via unit files, or via
/etc/fstab
(see
\fBfstab\fR(5)
for details)\&.
.PP
For details how systemd parses
/etc/fstab
see
\fBsystemd.mount\fR(5)\&.
.PP
If an automount point is configured in both
/etc/fstab
and a unit file, the configuration in the latter takes precedence\&.
.SH "OPTIONS"
.PP
Automount unit files may include [Unit] and [Install] sections, which are described in
\fBsystemd.unit\fR(5)\&.
.PP
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:
.PP
\fIWhere=\fR
.RS 4
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\&.
.RE
.PP
\fIExtraOptions=\fR
.RS 4
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
"%%"\&.
.sp
Added in version 250\&.
.RE
.PP
\fIDirectoryMode=\fR
.RS 4
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\&.
.RE
.PP
\fITimeoutIdleSec=\fR
.RS 4
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\&.
.sp
Added in version 220\&.
.RE
.PP
Check
\fBsystemd.unit\fR(5),
\fBsystemd.exec\fR(5), and
\fBsystemd.kill\fR(5)
for more settings\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1), \fBsystemctl\fR(1), \fBsystemd.unit\fR(5), \fBsystemd.mount\fR(5), \fBmount\fR(8), \fBautomount\fR(8), \fBsystemd.directives\fR(7)