]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.mount.xml
Merge pull request #16281 from poettering/logind-cache-more-efi
[thirdparty/systemd.git] / man / systemd.mount.xml
CommitLineData
cdb788e4 1<?xml version='1.0'?> <!--*-nxml-*-->
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
cdb788e4
LP
5
6<refentry id="systemd.mount">
798d3a52
ZJS
7 <refentryinfo>
8 <title>systemd.mount</title>
9 <productname>systemd</productname>
798d3a52
ZJS
10 </refentryinfo>
11
12 <refmeta>
13 <refentrytitle>systemd.mount</refentrytitle>
14 <manvolnum>5</manvolnum>
15 </refmeta>
16
17 <refnamediv>
18 <refname>systemd.mount</refname>
19 <refpurpose>Mount unit configuration</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <para><filename><replaceable>mount</replaceable>.mount</filename></para>
24 </refsynopsisdiv>
25
26 <refsect1>
27 <title>Description</title>
28
29 <para>A unit configuration file whose name ends in
30 <literal>.mount</literal> encodes information about a file system
31 mount point controlled and supervised by systemd.</para>
32
33 <para>This man page lists the configuration options specific to
34 this unit type. See
35 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
36 for the common options of all unit configuration files. The common
f6275730
PW
37 configuration items are configured in the generic <literal>[Unit]</literal> and
38 <literal>[Install]</literal> sections. The mount specific configuration options are
39 configured in the <literal>[Mount]</literal> section.</para>
798d3a52
ZJS
40
41 <para>Additional options are listed in
42 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
43 which define the execution environment the
3ba3a79d 44 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
3f2d1365 45 program is executed in, and in
798d3a52
ZJS
46 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
47 which define the way the processes are terminated, and in
48 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
49 which configure resource control settings for the processes of the
5e0aff56
AJ
50 service.</para>
51
52 <para>Note that the options <varname>User=</varname> and
53 <varname>Group=</varname> are not useful for mount units.
54 systemd passes two parameters to
55 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>;
56 the values of <varname>What=</varname> and <varname>Where=</varname>.
57 When invoked in this way,
3ba3a79d 58 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
5e0aff56
AJ
59 does not read any options from <filename>/etc/fstab</filename>, and
60 must be run as UID 0.</para>
798d3a52 61
f4bf8d2f 62 <para>Mount units must be named after the mount point directories they control. Example: the mount point <filename
b0343f8c 63 index="false">/home/lennart</filename> must be configured in a unit file <filename>home-lennart.mount</filename>.
f4bf8d2f
LP
64 For details about the escaping logic used to convert a file system path to a unit name, see
65 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note that mount
66 units cannot be templated, nor is possible to add multiple names to a mount unit by creating additional symlinks to
67 it.</para>
798d3a52
ZJS
68
69 <para>Optionally, a mount unit may be accompanied by an automount
70 unit, to allow on-demand or parallelized mounting. See
71 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
72
798d3a52
ZJS
73 <para>Mount points created at runtime (independently of unit files
74 or <filename>/etc/fstab</filename>) will be monitored by systemd
75 and appear like any other mount unit in systemd. See
76 <filename>/proc/self/mountinfo</filename> description in
77 <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
78 </para>
79
80 <para>Some file systems have special semantics as API file systems
ff9b60f3 81 for kernel-to-userspace and userspace-to-userspace interfaces. Some
798d3a52
ZJS
82 of them may not be changed via mount units, and cannot be
83 disabled. For a longer discussion see <ulink
28a0ad81 84 url="https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems">API
798d3a52 85 File Systems</ulink>.</para>
438e6a48
LP
86
87 <para>The
88 <citerefentry><refentrytitle>systemd-mount</refentrytitle><manvolnum>1</manvolnum></citerefentry> command
89 allows creating <filename>.mount</filename> and <filename>.automount</filename> units dynamically and
90 transiently from the command line.</para>
798d3a52
ZJS
91 </refsect1>
92
c129bd5d 93 <refsect1>
aed5cb03
ZJS
94 <title>Automatic Dependencies</title>
95
96 <refsect2>
97 <title>Implicit Dependencies</title>
98
99 <para>The following dependencies are implicitly added:</para>
100
101 <itemizedlist>
102 <listitem><para>If a mount unit is beneath another mount unit in the file
103 system hierarchy, both a requirement dependency and an ordering
104 dependency between both units are created automatically.</para></listitem>
105
106 <listitem><para>Block device backed file systems automatically gain
107 <varname>BindsTo=</varname> and <varname>After=</varname> type
108 dependencies on the device unit encapsulating the block
109 device (see below).</para></listitem>
110
111 <listitem><para>If traditional file system quota is enabled for a mount
112 unit, automatic <varname>Wants=</varname> and
113 <varname>Before=</varname> dependencies on
114 <filename>systemd-quotacheck.service</filename> and
115 <filename>quotaon.service</filename> are added.</para></listitem>
116
117 <listitem><para>Additional implicit dependencies may be added as result of
118 execution and resource control parameters as documented in
119 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
120 and
121 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
122 </para></listitem>
123 </itemizedlist>
124 </refsect2>
125
126 <refsect2>
127 <title>Default Dependencies</title>
128
129 <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
130
131 <itemizedlist>
132 <listitem><para>All mount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
133 <filename>umount.target</filename> in order to be stopped during shutdown.</para></listitem>
134
135 <listitem><para>Mount units referring to local file systems automatically gain
321cd1c1
YW
136 an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>, and a
137 <varname>Before=</varname> dependency on <filename>local-fs.target</filename> unless
138 <option>nofail</option> mount option is set.</para></listitem>
aed5cb03
ZJS
139
140 <listitem><para>Network mount units
141 automatically acquire <varname>After=</varname> dependencies on <filename>remote-fs-pre.target</filename>,
321cd1c1
YW
142 <filename>network.target</filename> and <filename>network-online.target</filename>, and gain a
143 <varname>Before=</varname> dependency on <filename>remote-fs.target</filename> unless
144 <option>nofail</option> mount option is set. Towards the latter a
aed5cb03
ZJS
145 <varname>Wants=</varname> unit is added as well.</para></listitem>
146 </itemizedlist>
147
148 <para>Mount units referring to local and network file systems are distinguished by their file system type
149 specification. In some cases this is not sufficient (for example network block device based mounts, such as
150 iSCSI), in which case <option>_netdev</option> may be added to the mount option string of the unit, which forces
151 systemd to consider the mount unit a network mount.</para>
152 </refsect2>
c129bd5d
LP
153 </refsect1>
154
798d3a52
ZJS
155 <refsect1>
156 <title><filename>fstab</filename></title>
157
158 <para>Mount units may either be configured via unit files, or via
159 <filename>/etc/fstab</filename> (see
3ba3a79d 160 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
798d3a52
ZJS
161 for details). Mounts listed in <filename>/etc/fstab</filename>
162 will be converted into native units dynamically at boot and when
163 the configuration of the system manager is reloaded. In general,
164 configuring mount points through <filename>/etc/fstab</filename>
165 is the preferred approach. See
166 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
167 for details about the conversion.</para>
168
773ebc0c 169 <para>The NFS mount option <option>bg</option> for NFS background mounts
0a07667d 170 as documented in <citerefentry project='man-pages'><refentrytitle>nfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65e1dee7
N
171 is detected by <command>systemd-fstab-generator</command> and the options
172 are transformed so that systemd fulfills the job-control implications of
173 that option. Specifically <command>systemd-fstab-generator</command> acts
41fc3fab 174 as though <literal>x-systemd.mount-timeout=infinity,retry=10000</literal> was
65e1dee7
N
175 prepended to the option list, and <literal>fg,nofail</literal> was appended.
176 Depending on specific requirements, it may be appropriate to provide some of
177 these options explicitly, or to make use of the
178 <literal>x-systemd.automount</literal> option described below instead
179 of using <literal>bg</literal>.</para>
773ebc0c 180
798d3a52
ZJS
181 <para>When reading <filename>/etc/fstab</filename> a few special
182 mount options are understood by systemd which influence how
183 dependencies are created for mount points. systemd will create a
c129bd5d 184 dependency of type <varname>Wants=</varname> or
a37ef455 185 <option>Requires=</option> (see option <option>nofail</option>
798d3a52
ZJS
186 below), from either <filename>local-fs.target</filename> or
187 <filename>remote-fs.target</filename>, depending whether the file
188 system is local or remote.</para>
189
190 <variablelist class='fstab-options'>
191
3519d230
KZ
192 <varlistentry>
193 <term><option>x-systemd.requires=</option></term>
194
195 <listitem><para>Configures a <varname>Requires=</varname> and
196 an <varname>After=</varname> dependency between the created
197 mount unit and another systemd unit, such as a device or mount
198 unit. The argument should be a unit name, or an absolute path
199 to a device node or mount point. This option may be specified
200 more than once. This option is particularly useful for mount
201 point declarations that need an additional device to be around
202 (such as an external journal device for journal file systems)
203 or an additional mount to be in place (such as an overlay file
204 system that merges multiple mount points). See
205 <varname>After=</varname> and <varname>Requires=</varname> in
206 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
207 for details.</para></listitem>
208 </varlistentry>
209
ae325185
RB
210 <varlistentry>
211 <term><option>x-systemd.before=</option></term>
212 <term><option>x-systemd.after=</option></term>
213
81248e7f
AR
214 <listitem><para>In the created mount unit, configures a
215 <varname>Before=</varname> or <varname>After=</varname>
216 dependency on another systemd unit, such as a mount unit.
ae325185
RB
217 The argument should be a unit name or an absolute path
218 to a mount point. This option may be specified more than once.
219 This option is particularly useful for mount point declarations
220 with <option>nofail</option> option that are mounted
221 asynchronously but need to be mounted before or after some unit
222 start, for example, before <filename>local-fs.target</filename>
223 unit.
224 See <varname>Before=</varname> and <varname>After=</varname> in
225 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
226 for details.</para></listitem>
227 </varlistentry>
228
be02c1cf
AR
229 <varlistentry>
230 <term><option>x-systemd.wanted-by=</option></term>
231 <term><option>x-systemd.required-by=</option></term>
232
233 <listitem><para>In the created mount unit, configures a
234 <varname>WantedBy=</varname> or <varname>RequiredBy=</varname>
235 dependency on another unit. This option may be
236 specified more than once. If this is specified, the normal
237 automatic dependencies on the created mount unit, e.g.,
238 <filename>local-fs.target</filename>, are not automatically
239 created. See <varname>WantedBy=</varname> and <varname>RequiredBy=</varname> in
240 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
241 for details.</para></listitem>
242 </varlistentry>
243
3519d230
KZ
244 <varlistentry>
245 <term><option>x-systemd.requires-mounts-for=</option></term>
246
247 <listitem><para>Configures a
248 <varname>RequiresMountsFor=</varname> dependency between the
249 created mount unit and other mount units. The argument must be
250 an absolute path. This option may be specified more than once.
251 See <varname>RequiresMountsFor=</varname> in
252 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
253 for details.</para></listitem>
254 </varlistentry>
255
ebc8968b
FB
256 <varlistentry>
257 <term><option>x-systemd.device-bound</option></term>
258
259 <listitem><para>The block device backed file system will be upgraded
260 to <varname>BindsTo=</varname> dependency. This option is only useful
261 when mounting file systems manually with
98e9d710 262 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
ebc8968b
FB
263 as the default dependency in this case is <varname>Requires=</varname>.
264 This option is already implied by entries in <filename>/etc/fstab</filename>
265 or by mount units.
266 </para></listitem>
267 </varlistentry>
268
798d3a52
ZJS
269 <varlistentry>
270 <term><option>x-systemd.automount</option></term>
271
272 <listitem><para>An automount unit will be created for the file
273 system. See
274 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
275 for details.</para></listitem>
276 </varlistentry>
277
deb0a77c
MO
278 <varlistentry>
279 <term><option>x-systemd.idle-timeout=</option></term>
280
a8eaaee7 281 <listitem><para>Configures the idle timeout of the
deb0a77c
MO
282 automount unit. See <varname>TimeoutIdleSec=</varname> in
283 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
284 for details.</para></listitem>
285 </varlistentry>
286
f0c5cda2 287 <varlistentry id='device-timeout'>
798d3a52
ZJS
288 <term><option>x-systemd.device-timeout=</option></term>
289
290 <listitem><para>Configure how long systemd should wait for a
291 device to show up before giving up on an entry from
292 <filename>/etc/fstab</filename>. Specify a time in seconds or
a8eaaee7 293 explicitly append a unit such as <literal>s</literal>,
798d3a52
ZJS
294 <literal>min</literal>, <literal>h</literal>,
295 <literal>ms</literal>.</para>
296
297 <para>Note that this option can only be used in
298 <filename>/etc/fstab</filename>, and will be
a8eaaee7 299 ignored when part of the <varname>Options=</varname>
798d3a52
ZJS
300 setting in a unit file.</para>
301 </listitem>
302 </varlistentry>
303
110773f6
CH
304 <varlistentry>
305 <term><option>x-systemd.mount-timeout=</option></term>
306
307 <listitem><para>Configure how long systemd should wait for the
308 mount command to finish before giving up on an entry from
309 <filename>/etc/fstab</filename>. Specify a time in seconds or
310 explicitly append a unit such as <literal>s</literal>,
311 <literal>min</literal>, <literal>h</literal>,
312 <literal>ms</literal>.</para>
313
314 <para>Note that this option can only be used in
315 <filename>/etc/fstab</filename>, and will be
316 ignored when part of the <varname>Options=</varname>
317 setting in a unit file.</para>
318
319 <para>See <varname>TimeoutSec=</varname> below for
320 details.</para>
321 </listitem>
322 </varlistentry>
0f00528d 323
58e0ac33
ZJS
324 <varlistentry>
325 <term><option>x-systemd.makefs</option></term>
326
f0c5cda2 327 <listitem><para>The file system will be initialized
58e0ac33
ZJS
328 on the device. If the device is not "empty", i.e. it contains any signature,
329 the operation will be skipped. It is hence expected that this option
5238e957 330 remains set even after the device has been initialized.</para>
58e0ac33
ZJS
331
332 <para>Note that this option can only be used in
333 <filename>/etc/fstab</filename>, and will be ignored when part of the
334 <varname>Options=</varname> setting in a unit file.</para>
335
336 <para>See
337 <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
338 </para>
339
340 <para><citerefentry project='man-pages'><refentrytitle>wipefs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
341 may be used to remove any signatures from a block device to force
342 <option>x-systemd.makefs</option> to reinitialize the device.</para>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry>
347 <term><option>x-systemd.growfs</option></term>
348
349 <listitem><para>The file system will be grown to occupy the full block
350 device. If the file system is already at maximum size, no action will
351 be performed. It is hence expected that this option remains set even after
352 the file system has been grown. Only certain file system types are supported,
353 see
354 <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
355 for details.</para>
356
357 <para>Note that this option can only be used in
358 <filename>/etc/fstab</filename>, and will be ignored when part of the
359 <varname>Options=</varname> setting in a unit file.</para></listitem>
360 </varlistentry>
361
ad765605
MH
362 <varlistentry>
363 <term><option>x-systemd.rw-only</option></term>
364
365 <listitem><para>If a mount operation fails to mount the file system
366 read-write, it normally tries mounting the file system read-only instead.
367 This option disables that behaviour, and causes the mount to fail
368 immediately instead. This option is translated into the
369 <varname>ReadWriteOnly=</varname> setting in a unit file.</para>
370 </listitem>
371 </varlistentry>
372
0f00528d
ZJS
373 <varlistentry>
374 <term><option>_netdev</option></term>
375
376 <listitem><para>Normally the file system type is used to determine if a
377 mount is a "network mount", i.e. if it should only be started after the
378 network is available. Using this option overrides this detection and
379 specifies that the mount requires network.</para>
380
381 <para>Network mount units are ordered between <filename>remote-fs-pre.target</filename>
382 and <filename>remote-fs.target</filename>, instead of
383 <filename>local-fs-pre.target</filename> and <filename>local-fs.target</filename>.
384 They also pull in <filename>network-online.target</filename> and are ordered after
385 it and <filename>network.target</filename>.</para>
386 </listitem>
387 </varlistentry>
388
798d3a52
ZJS
389 <varlistentry>
390 <term><option>noauto</option></term>
391 <term><option>auto</option></term>
392
0c08bc7f
LP
393 <listitem><para>With <option>noauto</option>, the mount unit will not be added as a dependency for
394 <filename>local-fs.target</filename> or <filename>remote-fs.target</filename>. This means that it will not be
395 mounted automatically during boot, unless it is pulled in by some other unit. The <option>auto</option> option
396 has the opposite meaning and is the default. Note that the <option>noauto</option> option has an effect on the
397 mount unit itself only — if <option>x-systemd.automount</option> is used (see above), then the matching
398 automount unit will still be pulled in by these targets.</para>
798d3a52
ZJS
399 </listitem>
400 </varlistentry>
401
402 <varlistentry>
403 <term><option>nofail</option></term>
404
e6c7c7ff
LP
405 <listitem><para>With <option>nofail</option>, this mount will be only wanted, not required, by
406 <filename>local-fs.target</filename> or <filename>remote-fs.target</filename>. Moreover the mount unit is not
407 ordered before these target units. This means that the boot will continue without waiting for the mount unit
408 and regardless whether the mount point can be mounted successfully.</para>
798d3a52
ZJS
409 </listitem>
410 </varlistentry>
411
412 <varlistentry>
413 <term><option>x-initrd.mount</option></term>
414
415 <listitem><para>An additional filesystem to be mounted in the
416 initramfs. See <filename>initrd-fs.target</filename>
417 description in
418 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
419 </para></listitem>
420 </varlistentry>
421 </variablelist>
422
423 <para>If a mount point is configured in both
424 <filename>/etc/fstab</filename> and a unit file that is stored
425 below <filename>/usr</filename>, the former will take precedence.
426 If the unit file is stored below <filename>/etc</filename>, it
427 will take precedence. This means: native unit files take
428 precedence over traditional configuration files, but this is
429 superseded by the rule that configuration in
430 <filename>/etc</filename> will always take precedence over
431 configuration in <filename>/usr</filename>.</para>
432 </refsect1>
433
434 <refsect1>
435 <title>Options</title>
436
437 <para>Mount files must include a [Mount] section, which carries
438 information about the file system mount points it supervises. A
439 number of options that may be used in this section are shared with
440 other unit types. These options are documented in
441 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
442 and
443 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
444 The options specific to the [Mount] section of mount units are the
445 following:</para>
446
447 <variablelist class='unit-directives'>
448
449 <varlistentry>
450 <term><varname>What=</varname></term>
151a7133
LP
451 <listitem><para>Takes an absolute path of a device node, file or other resource to mount. See
452 <citerefentry
453 project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
454 details. If this refers to a device node, a dependency on the respective device unit is automatically
455 created. (See
456 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
457 for more information.) This option is mandatory. Note that the usual specifier expansion is applied
6dbf4025
ZJS
458 to this setting, literal percent characters should hence be written as <literal
459 class='specifiers'>%%</literal>. If this mount is a bind mount and the specified path does not exist
460 yet it is created as directory.</para></listitem>
798d3a52
ZJS
461 </varlistentry>
462
463 <varlistentry>
464 <term><varname>Where=</varname></term>
f9951b0c
LP
465 <listitem><para>Takes an absolute path of a file or directory for the mount point; in particular, the
466 destination cannot be a symbolic link. If the mount point does not exist at the time of mounting, it
467 is created as directory. This string must be reflected in the unit filename. (See above.) This option
468 is mandatory.</para></listitem>
798d3a52
ZJS
469 </varlistentry>
470
471 <varlistentry>
472 <term><varname>Type=</varname></term>
473 <listitem><para>Takes a string for the file system type. See
3ba3a79d 474 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
475 for details. This setting is optional.</para></listitem>
476 </varlistentry>
477
478 <varlistentry>
479 <term><varname>Options=</varname></term>
480
d5cc4be2
LP
481 <listitem><para>Mount options to use when mounting. This takes a comma-separated list of options. This setting
482 is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters
6dbf4025 483 should hence be written as <literal class='specifiers'>%%</literal>.</para></listitem>
798d3a52
ZJS
484 </varlistentry>
485
486 <varlistentry>
487 <term><varname>SloppyOptions=</varname></term>
488
489 <listitem><para>Takes a boolean argument. If true, parsing of
490 the options specified in <varname>Options=</varname> is
491 relaxed, and unknown mount options are tolerated. This
492 corresponds with
3ba3a79d 493 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
798d3a52
ZJS
494 <parameter>-s</parameter> switch. Defaults to
495 off.</para></listitem>
496 </varlistentry>
e520950a
BR
497
498 <varlistentry>
499 <term><varname>LazyUnmount=</varname></term>
500
501 <listitem><para>Takes a boolean argument. If true, detach the
502 filesystem from the filesystem hierarchy at time of the unmount
503 operation, and clean up all references to the filesystem as
504 soon as they are not busy anymore.
505 This corresponds with
506 <citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
507 <parameter>-l</parameter> switch. Defaults to
508 off.</para></listitem>
509 </varlistentry>
4f8d40a9 510
75f4bd7f
MH
511 <varlistentry>
512 <term><varname>ReadWriteOnly=</varname></term>
513
514 <listitem><para>Takes a boolean argument. If false, a mount
515 point that shall be mounted read-write but cannot be mounted
516 so is retried to be mounted read-only. If true the operation
517 will fail immediately after the read-write mount attempt did
518 not succeed. This corresponds with
519 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
520 <parameter>-w</parameter> switch. Defaults to
521 off.</para></listitem>
522 </varlistentry>
523
4f8d40a9
BR
524 <varlistentry>
525 <term><varname>ForceUnmount=</varname></term>
526
527 <listitem><para>Takes a boolean argument. If true, force an
528 unmount (in case of an unreachable NFS system).
529 This corresponds with
530 <citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
531 <parameter>-f</parameter> switch. Defaults to
532 off.</para></listitem>
533 </varlistentry>
798d3a52
ZJS
534
535 <varlistentry>
536 <term><varname>DirectoryMode=</varname></term>
537 <listitem><para>Directories of mount points (and any parent
538 directories) are automatically created if needed. This option
539 specifies the file system access mode used when creating these
540 directories. Takes an access mode in octal notation. Defaults
541 to 0755.</para></listitem>
542 </varlistentry>
543
544 <varlistentry>
545 <term><varname>TimeoutSec=</varname></term>
546 <listitem><para>Configures the time to wait for the mount
547 command to finish. If a command does not exit within the
548 configured time, the mount will be considered failed and be
549 shut down again. All commands still running will be terminated
550 forcibly via <constant>SIGTERM</constant>, and after another
551 delay of this time with <constant>SIGKILL</constant>. (See
552 <option>KillMode=</option> in
553 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
554 Takes a unit-less value in seconds, or a time span value such
555 as "5min 20s". Pass 0 to disable the timeout logic. The
7e68a33b
YW
556 default value is set from <varname>DefaultTimeoutStartSec=</varname> option in
557 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
558 </para></listitem>
798d3a52
ZJS
559 </varlistentry>
560 </variablelist>
561
562 <para>Check
563 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
564 and
565 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
566 for more settings.</para>
567 </refsect1>
568
569 <refsect1>
570 <title>See Also</title>
571 <para>
572 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
573 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
7e68a33b 574 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a52
ZJS
575 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
576 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
577 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
578 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
579 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
580 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
581 <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3ba3a79d 582 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 583 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
438e6a48
LP
584 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
585 <citerefentry><refentrytitle>systemd-mount</refentrytitle><manvolnum>1</manvolnum></citerefentry>
798d3a52
ZJS
586 </para>
587 </refsect1>
cdb788e4
LP
588
589</refentry>