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