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