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