]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.mount.xml
journald: splitt of syslog protocol support into its own file
[thirdparty/systemd.git] / man / systemd.mount.xml
CommitLineData
cdb788e4
LP
1<?xml version='1.0'?> <!--*-nxml-*-->
2<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6<!--
7 This file is part of systemd.
8
9 Copyright 2010 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
cdb788e4
LP
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 19 Lesser General Public License for more details.
cdb788e4 20
5430f7f2 21 You should have received a copy of the GNU Lesser General Public License
cdb788e4
LP
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23-->
24
25<refentry id="systemd.mount">
26 <refentryinfo>
27 <title>systemd.mount</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.mount</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.mount</refname>
34511ca7 47 <refpurpose>Mount unit configuration</refpurpose>
cdb788e4
LP
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename>systemd.mount</filename></para>
52 </refsynopsisdiv>
53
54 <refsect1>
55 <title>Description</title>
56
57 <para>A unit configuration file whose name ends in
65232ea7
LP
58 <filename>.mount</filename> encodes information about
59 a file system mount point controlled and supervised by
60 systemd.</para>
cdb788e4
LP
61
62 <para>This man page lists the configuration options
63 specific to this unit type. See
64 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65 for the common options of all unit configuration
66 files. The common configuration items are configured
67 in the generic [Unit] and [Install] sections. The
68 mount specific configuration options are configured
69 in the [Mount] section.</para>
70
71 <para>Additional options are listed in
ba60f905
LP
72 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
73 which define the execution environment the
74 <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
4819ff03
LP
75 binary is executed in, and in
76 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
77 which define the way the processes are
78 terminated.</para>
cdb788e4 79
e0cabd4b
LP
80 <para>Mount units must be named after the mount point
81 directories they control. Example: the mount point
cdb788e4
LP
82 <filename>/home/lennart</filename> must be configured
83 in a unit file
84 <filename>home-lennart.mount</filename>. For details
85 about the escaping logic used to convert a file system
86 path to a unit name see
87 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
65232ea7
LP
88
89 <para>Optionally, a mount unit may be accompanied by
90 an automount unit, to allow on-demand or parallelized
91 mounting. See
92 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
e0cabd4b
LP
93
94 <para>If an mount point is beneath another mount point
b439c6ee 95 in the file system hierarchy, a dependency between both
e0cabd4b 96 units is created automatically.</para>
b36b082c
LP
97
98 <para>Mount points created at runtime independent on
99 unit files or <filename>/etc/fstab</filename> will be
100 monitored by systemd and appear like any other mount
101 unit in systemd.</para>
cdb788e4
LP
102 </refsect1>
103
104 <refsect1>
fa4ab997 105 <title><filename>/etc/fstab</filename></title>
cdb788e4
LP
106
107 <para>Mount units may either be configured via unit
108 files, or via <filename>/etc/fstab</filename> (see
109 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
059b37cc
LP
110 for details). Mounts listed in
111 <filename>/etc/fstab</filename> will be converted into
112 native units dynamically at boot and when the
113 configuration of the system manager is reloaded. See
114 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
115 for details about the conversion.</para>
cdb788e4
LP
116
117 <para>When reading <filename>/etc/fstab</filename> a
118 few special mount options are understood by systemd
119 which influence how dependencies are created for mount
92a39ae1
LP
120 points from <filename>/etc/fstab</filename>. systemd
121 will create a dependency of type
122 <option>Wants</option> from either
cdb788e4
LP
123 <filename>local-fs.target</filename> or
124 <filename>remote-fs.target</filename>, depending
125 whether the file system is local or remote. If
fa4ab997
LP
126 <option>x-systemd.automount</option> is set, an
127 automount unit will be created for the file
128 system. See
cdb788e4 129 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
fa4ab997 130 for details. If
92a39ae1 131 <option>x-systemd.device-timeout=</option> is
fa4ab997
LP
132 specified it may be used to configure how long systemd
133 should wait for a device to show up before giving up
134 on an entry from
135 <filename>/etc/fstab</filename>. Specify a time in
136 seconds or explicitly specifiy a unit as
137 <literal>s</literal>, <literal>min</literal>,
138 <literal>h</literal>, <literal>ms</literal>.</para>
cdb788e4
LP
139
140 <para>If a mount point is configured in both
b439c6ee 141 <filename>/etc/fstab</filename> and a unit file, the
cdb788e4
LP
142 configuration in the latter takes precedence.</para>
143 </refsect1>
144
145 <refsect1>
146 <title>Options</title>
147
148 <para>Mount files must include a [Mount] section,
149 which carries information about the file system mount points it
150 supervises. A number of options that may be used in
151 this section are shared with other unit types. These
152 options are documented in
4819ff03
LP
153 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
154 and
155 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The
65232ea7 156 options specific to the [Mount] section of mount
cdb788e4
LP
157 units are the following:</para>
158
159 <variablelist>
160
161 <varlistentry>
162 <term><varname>What=</varname></term>
163 <listitem><para>Takes an absolute path
164 of a device node, file or other
165 resource to mount. See
166 <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
167 for details. If this refers to a
b439c6ee 168 device node, a dependency on the
cdb788e4
LP
169 respective device unit is
170 automatically created. (See
171 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.)
172 This option is
173 mandatory.</para></listitem>
174 </varlistentry>
175
176 <varlistentry>
177 <term><varname>Where=</varname></term>
178 <listitem><para>Takes an absolute path
179 of a directory of the mount point. If
180 the mount point is not existing at
b439c6ee 181 time of mounting, it is created. This
cdb788e4
LP
182 string must be reflected in the unit
183 file name. (See above.) This option is
184 mandatory.</para></listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><varname>Type=</varname></term>
189 <listitem><para>Takes a string for the
190 filesystem type. See
191 <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
192 for details. This setting is
193 optional.</para></listitem>
194 </varlistentry>
195
196 <varlistentry>
197 <term><varname>Options=</varname></term>
198
199 <listitem><para>Mount options to use
200 when mounting. This takes a comma
96d4ce01 201 separated list of options. This
cdb788e4
LP
202 setting is optional.</para></listitem>
203 </varlistentry>
204
205 <varlistentry>
206 <term><varname>DirectoryMode=</varname></term>
207 <listitem><para>Directories of mount
208 points (and any parent directories)
209 are automatically created if
210 needed. This option specifies the file
211 system access mode used when creating
dd1eb43b
LP
212 these directories. Takes an access
213 mode in octal notation. Defaults to
cdb788e4
LP
214 0755.</para></listitem>
215 </varlistentry>
216
217 <varlistentry>
218 <term><varname>TimeoutSec=</varname></term>
219 <listitem><para>Configures the time to
220 wait for the mount command to
b439c6ee 221 finish. If a command does not exit
cdb788e4
LP
222 within the configured time the mount
223 will be considered failed and be shut
224 down again. All commands still running
225 will be terminated forcibly via
226 SIGTERM, and after another delay of
227 this time with SIGKILL. (See
4819ff03
LP
228 <option>KillMode=</option> in
229 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
cdb788e4
LP
230 Takes a unit-less value in seconds, or
231 a time span value such as "5min
232 20s". Pass 0 to disable the timeout
233 logic. Defaults to
ecb963cc 234 90s.</para></listitem>
cdb788e4 235 </varlistentry>
c485d3ba 236 </variablelist>
4819ff03
LP
237
238 <para>Check
239 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
240 and
241 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
242 for more settings.</para>
c485d3ba
LP
243 </refsect1>
244
245 <refsect1>
246 <title>Compatibility Options</title>
247
248 <para>The following option is also available in the
249 <literal>[Mount]</literal> section, but exists purely
250 for compatibility reasons and should not be used in
251 newly written mount files.</para>
252
253 <variablelist>
66b1a247
LP
254 <varlistentry>
255 <term><varname>FsckPassNo=</varname></term>
256
257 <listitem><para>The pass number for
258 the file system checking service for
259 this mount. See
260 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
261 for more information on this setting.
262 </para></listitem>
263 </varlistentry>
cdb788e4
LP
264 </variablelist>
265 </refsect1>
266
267 <refsect1>
268 <title>See Also</title>
269 <para>
f3e219a2 270 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
cdb788e4
LP
271 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
272 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
273 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
4819ff03 274 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
66b1a247 275 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
cdb788e4 276 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
059b37cc
LP
277 <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
278 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
cdb788e4
LP
279 </para>
280 </refsect1>
281
282</refentry>