]>
Commit | Line | Data |
---|---|---|
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 | |
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 | |
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 LP |
62 | <para>Mount units must be named after the mount point directories they control. Example: the mount point <filename |
63 | noindex='true'>/home/lennart</filename> must be configured in a unit file <filename>home-lennart.mount</filename>. | |
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 ZJS |
85 | File Systems</ulink>.</para> |
86 | </refsect1> | |
87 | ||
c129bd5d | 88 | <refsect1> |
aed5cb03 ZJS |
89 | <title>Automatic Dependencies</title> |
90 | ||
91 | <refsect2> | |
92 | <title>Implicit Dependencies</title> | |
93 | ||
94 | <para>The following dependencies are implicitly added:</para> | |
95 | ||
96 | <itemizedlist> | |
97 | <listitem><para>If a mount unit is beneath another mount unit in the file | |
98 | system hierarchy, both a requirement dependency and an ordering | |
99 | dependency between both units are created automatically.</para></listitem> | |
100 | ||
101 | <listitem><para>Block device backed file systems automatically gain | |
102 | <varname>BindsTo=</varname> and <varname>After=</varname> type | |
103 | dependencies on the device unit encapsulating the block | |
104 | device (see below).</para></listitem> | |
105 | ||
106 | <listitem><para>If traditional file system quota is enabled for a mount | |
107 | unit, automatic <varname>Wants=</varname> and | |
108 | <varname>Before=</varname> dependencies on | |
109 | <filename>systemd-quotacheck.service</filename> and | |
110 | <filename>quotaon.service</filename> are added.</para></listitem> | |
111 | ||
112 | <listitem><para>Additional implicit dependencies may be added as result of | |
113 | execution and resource control parameters as documented in | |
114 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
115 | and | |
116 | <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
117 | </para></listitem> | |
118 | </itemizedlist> | |
119 | </refsect2> | |
120 | ||
121 | <refsect2> | |
122 | <title>Default Dependencies</title> | |
123 | ||
124 | <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para> | |
125 | ||
126 | <itemizedlist> | |
127 | <listitem><para>All mount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on | |
128 | <filename>umount.target</filename> in order to be stopped during shutdown.</para></listitem> | |
129 | ||
130 | <listitem><para>Mount units referring to local file systems automatically gain | |
321cd1c1 YW |
131 | an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>, and a |
132 | <varname>Before=</varname> dependency on <filename>local-fs.target</filename> unless | |
133 | <option>nofail</option> mount option is set.</para></listitem> | |
aed5cb03 ZJS |
134 | |
135 | <listitem><para>Network mount units | |
136 | automatically acquire <varname>After=</varname> dependencies on <filename>remote-fs-pre.target</filename>, | |
321cd1c1 YW |
137 | <filename>network.target</filename> and <filename>network-online.target</filename>, and gain a |
138 | <varname>Before=</varname> dependency on <filename>remote-fs.target</filename> unless | |
139 | <option>nofail</option> mount option is set. Towards the latter a | |
aed5cb03 ZJS |
140 | <varname>Wants=</varname> unit is added as well.</para></listitem> |
141 | </itemizedlist> | |
142 | ||
143 | <para>Mount units referring to local and network file systems are distinguished by their file system type | |
144 | specification. In some cases this is not sufficient (for example network block device based mounts, such as | |
145 | iSCSI), in which case <option>_netdev</option> may be added to the mount option string of the unit, which forces | |
146 | systemd to consider the mount unit a network mount.</para> | |
147 | </refsect2> | |
c129bd5d LP |
148 | </refsect1> |
149 | ||
798d3a52 ZJS |
150 | <refsect1> |
151 | <title><filename>fstab</filename></title> | |
152 | ||
153 | <para>Mount units may either be configured via unit files, or via | |
154 | <filename>/etc/fstab</filename> (see | |
3ba3a79d | 155 | <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
798d3a52 ZJS |
156 | for details). Mounts listed in <filename>/etc/fstab</filename> |
157 | will be converted into native units dynamically at boot and when | |
158 | the configuration of the system manager is reloaded. In general, | |
159 | configuring mount points through <filename>/etc/fstab</filename> | |
160 | is the preferred approach. See | |
161 | <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
162 | for details about the conversion.</para> | |
163 | ||
773ebc0c | 164 | <para>The NFS mount option <option>bg</option> for NFS background mounts |
0a07667d | 165 | as documented in <citerefentry project='man-pages'><refentrytitle>nfs</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
65e1dee7 N |
166 | is detected by <command>systemd-fstab-generator</command> and the options |
167 | are transformed so that systemd fulfills the job-control implications of | |
168 | that option. Specifically <command>systemd-fstab-generator</command> acts | |
41fc3fab | 169 | as though <literal>x-systemd.mount-timeout=infinity,retry=10000</literal> was |
65e1dee7 N |
170 | prepended to the option list, and <literal>fg,nofail</literal> was appended. |
171 | Depending on specific requirements, it may be appropriate to provide some of | |
172 | these options explicitly, or to make use of the | |
173 | <literal>x-systemd.automount</literal> option described below instead | |
174 | of using <literal>bg</literal>.</para> | |
773ebc0c | 175 | |
798d3a52 ZJS |
176 | <para>When reading <filename>/etc/fstab</filename> a few special |
177 | mount options are understood by systemd which influence how | |
178 | dependencies are created for mount points. systemd will create a | |
c129bd5d | 179 | dependency of type <varname>Wants=</varname> or |
798d3a52 ZJS |
180 | <option>Requires</option> (see option <option>nofail</option> |
181 | below), from either <filename>local-fs.target</filename> or | |
182 | <filename>remote-fs.target</filename>, depending whether the file | |
183 | system is local or remote.</para> | |
184 | ||
185 | <variablelist class='fstab-options'> | |
186 | ||
3519d230 KZ |
187 | <varlistentry> |
188 | <term><option>x-systemd.requires=</option></term> | |
189 | ||
190 | <listitem><para>Configures a <varname>Requires=</varname> and | |
191 | an <varname>After=</varname> dependency between the created | |
192 | mount unit and another systemd unit, such as a device or mount | |
193 | unit. The argument should be a unit name, or an absolute path | |
194 | to a device node or mount point. This option may be specified | |
195 | more than once. This option is particularly useful for mount | |
196 | point declarations that need an additional device to be around | |
197 | (such as an external journal device for journal file systems) | |
198 | or an additional mount to be in place (such as an overlay file | |
199 | system that merges multiple mount points). See | |
200 | <varname>After=</varname> and <varname>Requires=</varname> in | |
201 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
202 | for details.</para></listitem> | |
203 | </varlistentry> | |
204 | ||
ae325185 RB |
205 | <varlistentry> |
206 | <term><option>x-systemd.before=</option></term> | |
207 | <term><option>x-systemd.after=</option></term> | |
208 | ||
209 | <listitem><para>Configures a <varname>Before=</varname> | |
210 | dependency or <varname>After=</varname> between the created | |
211 | mount unit and another systemd unit, such as a mount unit. | |
212 | The argument should be a unit name or an absolute path | |
213 | to a mount point. This option may be specified more than once. | |
214 | This option is particularly useful for mount point declarations | |
215 | with <option>nofail</option> option that are mounted | |
216 | asynchronously but need to be mounted before or after some unit | |
217 | start, for example, before <filename>local-fs.target</filename> | |
218 | unit. | |
219 | See <varname>Before=</varname> and <varname>After=</varname> in | |
220 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
221 | for details.</para></listitem> | |
222 | </varlistentry> | |
223 | ||
3519d230 KZ |
224 | <varlistentry> |
225 | <term><option>x-systemd.requires-mounts-for=</option></term> | |
226 | ||
227 | <listitem><para>Configures a | |
228 | <varname>RequiresMountsFor=</varname> dependency between the | |
229 | created mount unit and other mount units. The argument must be | |
230 | an absolute path. This option may be specified more than once. | |
231 | See <varname>RequiresMountsFor=</varname> in | |
232 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
233 | for details.</para></listitem> | |
234 | </varlistentry> | |
235 | ||
ebc8968b FB |
236 | <varlistentry> |
237 | <term><option>x-systemd.device-bound</option></term> | |
238 | ||
239 | <listitem><para>The block device backed file system will be upgraded | |
240 | to <varname>BindsTo=</varname> dependency. This option is only useful | |
241 | when mounting file systems manually with | |
98e9d710 | 242 | <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
ebc8968b FB |
243 | as the default dependency in this case is <varname>Requires=</varname>. |
244 | This option is already implied by entries in <filename>/etc/fstab</filename> | |
245 | or by mount units. | |
246 | </para></listitem> | |
247 | </varlistentry> | |
248 | ||
798d3a52 ZJS |
249 | <varlistentry> |
250 | <term><option>x-systemd.automount</option></term> | |
251 | ||
252 | <listitem><para>An automount unit will be created for the file | |
253 | system. See | |
254 | <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
255 | for details.</para></listitem> | |
256 | </varlistentry> | |
257 | ||
deb0a77c MO |
258 | <varlistentry> |
259 | <term><option>x-systemd.idle-timeout=</option></term> | |
260 | ||
a8eaaee7 | 261 | <listitem><para>Configures the idle timeout of the |
deb0a77c MO |
262 | automount unit. See <varname>TimeoutIdleSec=</varname> in |
263 | <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
264 | for details.</para></listitem> | |
265 | </varlistentry> | |
266 | ||
f0c5cda2 | 267 | <varlistentry id='device-timeout'> |
798d3a52 ZJS |
268 | <term><option>x-systemd.device-timeout=</option></term> |
269 | ||
270 | <listitem><para>Configure how long systemd should wait for a | |
271 | device to show up before giving up on an entry from | |
272 | <filename>/etc/fstab</filename>. Specify a time in seconds or | |
a8eaaee7 | 273 | explicitly append a unit such as <literal>s</literal>, |
798d3a52 ZJS |
274 | <literal>min</literal>, <literal>h</literal>, |
275 | <literal>ms</literal>.</para> | |
276 | ||
277 | <para>Note that this option can only be used in | |
278 | <filename>/etc/fstab</filename>, and will be | |
a8eaaee7 | 279 | ignored when part of the <varname>Options=</varname> |
798d3a52 ZJS |
280 | setting in a unit file.</para> |
281 | </listitem> | |
282 | </varlistentry> | |
283 | ||
110773f6 CH |
284 | <varlistentry> |
285 | <term><option>x-systemd.mount-timeout=</option></term> | |
286 | ||
287 | <listitem><para>Configure how long systemd should wait for the | |
288 | mount command to finish before giving up on an entry from | |
289 | <filename>/etc/fstab</filename>. Specify a time in seconds or | |
290 | explicitly append a unit such as <literal>s</literal>, | |
291 | <literal>min</literal>, <literal>h</literal>, | |
292 | <literal>ms</literal>.</para> | |
293 | ||
294 | <para>Note that this option can only be used in | |
295 | <filename>/etc/fstab</filename>, and will be | |
296 | ignored when part of the <varname>Options=</varname> | |
297 | setting in a unit file.</para> | |
298 | ||
299 | <para>See <varname>TimeoutSec=</varname> below for | |
300 | details.</para> | |
301 | </listitem> | |
302 | </varlistentry> | |
0f00528d | 303 | |
58e0ac33 ZJS |
304 | <varlistentry> |
305 | <term><option>x-systemd.makefs</option></term> | |
306 | ||
f0c5cda2 | 307 | <listitem><para>The file system will be initialized |
58e0ac33 ZJS |
308 | on the device. If the device is not "empty", i.e. it contains any signature, |
309 | the operation will be skipped. It is hence expected that this option | |
310 | remains set even after the device has been initalized.</para> | |
311 | ||
312 | <para>Note that this option can only be used in | |
313 | <filename>/etc/fstab</filename>, and will be ignored when part of the | |
314 | <varname>Options=</varname> setting in a unit file.</para> | |
315 | ||
316 | <para>See | |
317 | <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
318 | </para> | |
319 | ||
320 | <para><citerefentry project='man-pages'><refentrytitle>wipefs</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
321 | may be used to remove any signatures from a block device to force | |
322 | <option>x-systemd.makefs</option> to reinitialize the device.</para> | |
323 | </listitem> | |
324 | </varlistentry> | |
325 | ||
326 | <varlistentry> | |
327 | <term><option>x-systemd.growfs</option></term> | |
328 | ||
329 | <listitem><para>The file system will be grown to occupy the full block | |
330 | device. If the file system is already at maximum size, no action will | |
331 | be performed. It is hence expected that this option remains set even after | |
332 | the file system has been grown. Only certain file system types are supported, | |
333 | see | |
334 | <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
335 | for details.</para> | |
336 | ||
337 | <para>Note that this option can only be used in | |
338 | <filename>/etc/fstab</filename>, and will be ignored when part of the | |
339 | <varname>Options=</varname> setting in a unit file.</para></listitem> | |
340 | </varlistentry> | |
341 | ||
0f00528d ZJS |
342 | <varlistentry> |
343 | <term><option>_netdev</option></term> | |
344 | ||
345 | <listitem><para>Normally the file system type is used to determine if a | |
346 | mount is a "network mount", i.e. if it should only be started after the | |
347 | network is available. Using this option overrides this detection and | |
348 | specifies that the mount requires network.</para> | |
349 | ||
350 | <para>Network mount units are ordered between <filename>remote-fs-pre.target</filename> | |
351 | and <filename>remote-fs.target</filename>, instead of | |
352 | <filename>local-fs-pre.target</filename> and <filename>local-fs.target</filename>. | |
353 | They also pull in <filename>network-online.target</filename> and are ordered after | |
354 | it and <filename>network.target</filename>.</para> | |
355 | </listitem> | |
356 | </varlistentry> | |
357 | ||
798d3a52 ZJS |
358 | <varlistentry> |
359 | <term><option>noauto</option></term> | |
360 | <term><option>auto</option></term> | |
361 | ||
0c08bc7f LP |
362 | <listitem><para>With <option>noauto</option>, the mount unit will not be added as a dependency for |
363 | <filename>local-fs.target</filename> or <filename>remote-fs.target</filename>. This means that it will not be | |
364 | mounted automatically during boot, unless it is pulled in by some other unit. The <option>auto</option> option | |
365 | has the opposite meaning and is the default. Note that the <option>noauto</option> option has an effect on the | |
366 | mount unit itself only — if <option>x-systemd.automount</option> is used (see above), then the matching | |
367 | automount unit will still be pulled in by these targets.</para> | |
798d3a52 ZJS |
368 | </listitem> |
369 | </varlistentry> | |
370 | ||
371 | <varlistentry> | |
372 | <term><option>nofail</option></term> | |
373 | ||
e6c7c7ff LP |
374 | <listitem><para>With <option>nofail</option>, this mount will be only wanted, not required, by |
375 | <filename>local-fs.target</filename> or <filename>remote-fs.target</filename>. Moreover the mount unit is not | |
376 | ordered before these target units. This means that the boot will continue without waiting for the mount unit | |
377 | and regardless whether the mount point can be mounted successfully.</para> | |
798d3a52 ZJS |
378 | </listitem> |
379 | </varlistentry> | |
380 | ||
381 | <varlistentry> | |
382 | <term><option>x-initrd.mount</option></term> | |
383 | ||
384 | <listitem><para>An additional filesystem to be mounted in the | |
385 | initramfs. See <filename>initrd-fs.target</filename> | |
386 | description in | |
387 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
388 | </para></listitem> | |
389 | </varlistentry> | |
390 | </variablelist> | |
391 | ||
392 | <para>If a mount point is configured in both | |
393 | <filename>/etc/fstab</filename> and a unit file that is stored | |
394 | below <filename>/usr</filename>, the former will take precedence. | |
395 | If the unit file is stored below <filename>/etc</filename>, it | |
396 | will take precedence. This means: native unit files take | |
397 | precedence over traditional configuration files, but this is | |
398 | superseded by the rule that configuration in | |
399 | <filename>/etc</filename> will always take precedence over | |
400 | configuration in <filename>/usr</filename>.</para> | |
401 | </refsect1> | |
402 | ||
403 | <refsect1> | |
404 | <title>Options</title> | |
405 | ||
406 | <para>Mount files must include a [Mount] section, which carries | |
407 | information about the file system mount points it supervises. A | |
408 | number of options that may be used in this section are shared with | |
409 | other unit types. These options are documented in | |
410 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
411 | and | |
412 | <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
413 | The options specific to the [Mount] section of mount units are the | |
414 | following:</para> | |
415 | ||
416 | <variablelist class='unit-directives'> | |
417 | ||
418 | <varlistentry> | |
419 | <term><varname>What=</varname></term> | |
19d0833b LP |
420 | <listitem><para>Takes an absolute path of a device node, file or other resource to mount. See <citerefentry |
421 | project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> for details. If | |
422 | this refers to a device node, a dependency on the respective device unit is automatically created. (See | |
423 | <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more | |
424 | information.) This option is mandatory. Note that the usual specifier expansion is applied to this setting, | |
425 | literal percent characters should hence be written as <literal>%%</literal>.</para></listitem> | |
798d3a52 ZJS |
426 | </varlistentry> |
427 | ||
428 | <varlistentry> | |
429 | <term><varname>Where=</varname></term> | |
634735b5 CW |
430 | <listitem><para>Takes an absolute path of a directory for the |
431 | mount point; in particular, the destination cannot be a symbolic | |
432 | link. If the mount point does not exist at the time of | |
798d3a52 ZJS |
433 | mounting, it is created. This string must be reflected in the |
434 | unit filename. (See above.) This option is | |
435 | mandatory.</para></listitem> | |
436 | </varlistentry> | |
437 | ||
438 | <varlistentry> | |
439 | <term><varname>Type=</varname></term> | |
440 | <listitem><para>Takes a string for the file system type. See | |
3ba3a79d | 441 | <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
798d3a52 ZJS |
442 | for details. This setting is optional.</para></listitem> |
443 | </varlistentry> | |
444 | ||
445 | <varlistentry> | |
446 | <term><varname>Options=</varname></term> | |
447 | ||
d5cc4be2 LP |
448 | <listitem><para>Mount options to use when mounting. This takes a comma-separated list of options. This setting |
449 | is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters | |
450 | should hence be written as <literal>%%</literal>.</para></listitem> | |
798d3a52 ZJS |
451 | </varlistentry> |
452 | ||
453 | <varlistentry> | |
454 | <term><varname>SloppyOptions=</varname></term> | |
455 | ||
456 | <listitem><para>Takes a boolean argument. If true, parsing of | |
457 | the options specified in <varname>Options=</varname> is | |
458 | relaxed, and unknown mount options are tolerated. This | |
459 | corresponds with | |
3ba3a79d | 460 | <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s |
798d3a52 ZJS |
461 | <parameter>-s</parameter> switch. Defaults to |
462 | off.</para></listitem> | |
463 | </varlistentry> | |
e520950a BR |
464 | |
465 | <varlistentry> | |
466 | <term><varname>LazyUnmount=</varname></term> | |
467 | ||
468 | <listitem><para>Takes a boolean argument. If true, detach the | |
469 | filesystem from the filesystem hierarchy at time of the unmount | |
470 | operation, and clean up all references to the filesystem as | |
471 | soon as they are not busy anymore. | |
472 | This corresponds with | |
473 | <citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s | |
474 | <parameter>-l</parameter> switch. Defaults to | |
475 | off.</para></listitem> | |
476 | </varlistentry> | |
4f8d40a9 BR |
477 | |
478 | <varlistentry> | |
479 | <term><varname>ForceUnmount=</varname></term> | |
480 | ||
481 | <listitem><para>Takes a boolean argument. If true, force an | |
482 | unmount (in case of an unreachable NFS system). | |
483 | This corresponds with | |
484 | <citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s | |
485 | <parameter>-f</parameter> switch. Defaults to | |
486 | off.</para></listitem> | |
487 | </varlistentry> | |
798d3a52 ZJS |
488 | |
489 | <varlistentry> | |
490 | <term><varname>DirectoryMode=</varname></term> | |
491 | <listitem><para>Directories of mount points (and any parent | |
492 | directories) are automatically created if needed. This option | |
493 | specifies the file system access mode used when creating these | |
494 | directories. Takes an access mode in octal notation. Defaults | |
495 | to 0755.</para></listitem> | |
496 | </varlistentry> | |
497 | ||
498 | <varlistentry> | |
499 | <term><varname>TimeoutSec=</varname></term> | |
500 | <listitem><para>Configures the time to wait for the mount | |
501 | command to finish. If a command does not exit within the | |
502 | configured time, the mount will be considered failed and be | |
503 | shut down again. All commands still running will be terminated | |
504 | forcibly via <constant>SIGTERM</constant>, and after another | |
505 | delay of this time with <constant>SIGKILL</constant>. (See | |
506 | <option>KillMode=</option> in | |
507 | <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.) | |
508 | Takes a unit-less value in seconds, or a time span value such | |
509 | as "5min 20s". Pass 0 to disable the timeout logic. The | |
7e68a33b YW |
510 | default value is set from <varname>DefaultTimeoutStartSec=</varname> option in |
511 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
512 | </para></listitem> | |
798d3a52 ZJS |
513 | </varlistentry> |
514 | </variablelist> | |
515 | ||
516 | <para>Check | |
517 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
518 | and | |
519 | <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
520 | for more settings.</para> | |
521 | </refsect1> | |
522 | ||
523 | <refsect1> | |
524 | <title>See Also</title> | |
525 | <para> | |
526 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
527 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
7e68a33b | 528 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
798d3a52 ZJS |
529 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
530 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
531 | <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
532 | <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
533 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
534 | <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
535 | <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
3ba3a79d | 536 | <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
798d3a52 ZJS |
537 | <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
538 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
539 | </para> | |
540 | </refsect1> | |
cdb788e4 LP |
541 | |
542 | </refentry> |