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