]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.automount.xml
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / man / systemd.automount.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7 -->
8
9 <refentry id="systemd.automount">
10 <refentryinfo>
11 <title>systemd.automount</title>
12 <productname>systemd</productname>
13
14 <authorgroup>
15 <author>
16 <contrib>Developer</contrib>
17 <firstname>Lennart</firstname>
18 <surname>Poettering</surname>
19 <email>lennart@poettering.net</email>
20 </author>
21 </authorgroup>
22 </refentryinfo>
23
24 <refmeta>
25 <refentrytitle>systemd.automount</refentrytitle>
26 <manvolnum>5</manvolnum>
27 </refmeta>
28
29 <refnamediv>
30 <refname>systemd.automount</refname>
31 <refpurpose>Automount unit configuration</refpurpose>
32 </refnamediv>
33
34 <refsynopsisdiv>
35 <para><filename><replaceable>automount</replaceable>.automount</filename></para>
36 </refsynopsisdiv>
37
38 <refsect1>
39 <title>Description</title>
40
41 <para>A unit configuration file whose name ends in
42 <literal>.automount</literal> encodes information about a file
43 system automount point controlled and supervised by
44 systemd.</para>
45
46 <para>This man page lists the configuration options specific to
47 this unit type. See
48 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
49 for the common options of all unit configuration files. The common
50 configuration items are configured in the generic [Unit] and
51 [Install] sections. The automount specific configuration options
52 are configured in the [Automount] section.</para>
53
54 <para>Automount units must be named after the automount directories they control. Example: the automount point
55 <filename noindex='true'>/home/lennart</filename> must be configured in a unit file
56 <filename>home-lennart.automount</filename>. For details about the escaping logic used to convert a file system
57 path to a unit name see
58 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note that
59 automount units cannot be templated, nor is it possible to add multiple names to an automount unit by creating
60 additional symlinks to its unit file.</para>
61
62 <para>For each automount unit file a matching mount unit file (see
63 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
64 for details) must exist which is activated when the automount path
65 is accessed. Example: if an automount unit
66 <filename>home-lennart.automount</filename> is active and the user
67 accesses <filename>/home/lennart</filename> the mount unit
68 <filename>home-lennart.mount</filename> will be activated.</para>
69
70 <para>Automount units may be used to implement on-demand mounting
71 as well as parallelized mounting of file systems.</para>
72 </refsect1>
73
74 <refsect1>
75 <title>Automatic Dependencies</title>
76
77 <refsect2>
78 <title>Implicit Dependencies</title>
79
80 <para>The following dependencies are implicitly added:</para>
81
82 <itemizedlist>
83 <listitem><para>If an automount unit is beneath another mount unit in the
84 file system hierarchy, both a requirement and an ordering
85 dependency between both units are created automatically.</para></listitem>
86
87 <listitem><para>An implicit <varname>Before=</varname> dependency is created
88 between an automount unit and the mount unit it activates.</para></listitem>
89 </itemizedlist>
90 </refsect2>
91
92 <refsect2>
93 <title>Default Dependencies</title>
94
95 <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
96
97 <itemizedlist>
98 <listitem><para>Automount units acquire automatic <varname>Before=</varname> and
99 <varname>Conflicts=</varname> on <filename>umount.target</filename> in order to be stopped during
100 shutdown.</para></listitem>
101 </itemizedlist>
102 </refsect2>
103 </refsect1>
104
105 <refsect1>
106 <title><filename>fstab</filename></title>
107
108 <para>Automount units may either be configured via unit files, or
109 via <filename>/etc/fstab</filename> (see
110 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
111 for details).</para>
112
113 <para>For details how systemd parses
114 <filename>/etc/fstab</filename> see
115 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
116
117 <para>If an automount point is configured in both
118 <filename>/etc/fstab</filename> and a unit file, the configuration
119 in the latter takes precedence.</para>
120 </refsect1>
121
122 <refsect1>
123 <title>Options</title>
124
125 <para>Automount files must include an [Automount] section, which
126 carries information about the file system automount points it
127 supervises. The options specific to the [Automount] section of
128 automount units are the following:</para>
129
130 <variablelist class='unit-directives'>
131
132 <varlistentry>
133 <term><varname>Where=</varname></term>
134 <listitem><para>Takes an absolute path of a directory of the
135 automount point. If the automount point does not exist at time
136 that the automount point is installed, it is created. This
137 string must be reflected in the unit filename. (See above.)
138 This option is mandatory.</para></listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term><varname>DirectoryMode=</varname></term>
143 <listitem><para>Directories of automount points (and any
144 parent directories) are automatically created if needed. This
145 option specifies the file system access mode used when
146 creating these directories. Takes an access mode in octal
147 notation. Defaults to 0755.</para></listitem>
148 </varlistentry>
149 <varlistentry>
150 <term><varname>TimeoutIdleSec=</varname></term>
151 <listitem><para>Configures an idle timeout. Once the mount has been
152 idle for the specified time, systemd will attempt to unmount. Takes a
153 unit-less value in seconds, or a time span value such as "5min 20s".
154 Pass 0 to disable the timeout logic. The timeout is disabled by
155 default.</para></listitem>
156 </varlistentry>
157 </variablelist>
158 </refsect1>
159
160 <refsect1>
161 <title>See Also</title>
162 <para>
163 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
164 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
165 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
166 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
167 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
168 <citerefentry project='die-net'><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
169 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
170 </para>
171 </refsect1>
172
173 </refentry>