]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.automount.xml
man: generate configured paths in manpages
[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 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 This file is part of systemd.
10
11 Copyright 2010 Lennart Poettering
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 -->
26
27 <refentry id="systemd.automount">
28 <refentryinfo>
29 <title>systemd.automount</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Lennart</firstname>
36 <surname>Poettering</surname>
37 <email>lennart@poettering.net</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>systemd.automount</refentrytitle>
44 <manvolnum>5</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>systemd.automount</refname>
49 <refpurpose>Automount unit configuration</refpurpose>
50 </refnamediv>
51
52 <refsynopsisdiv>
53 <para><filename><replaceable>automount</replaceable>.automount</filename></para>
54 </refsynopsisdiv>
55
56 <refsect1>
57 <title>Description</title>
58
59 <para>A unit configuration file whose name ends in
60 <literal>.automount</literal> encodes information about a file
61 system automount point controlled and supervised by
62 systemd.</para>
63
64 <para>This man page lists the configuration options specific to
65 this unit type. See
66 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
67 for the common options of all unit configuration files. The common
68 configuration items are configured in the generic [Unit] and
69 [Install] sections. The automount specific configuration options
70 are configured in the [Automount] section.</para>
71
72 <para>Automount units must be named after the automount
73 directories they control. Example: the automount point
74 <filename noindex='true'>/home/lennart</filename> must be
75 configured in a unit file
76 <filename>home-lennart.automount</filename>. For details about the
77 escaping logic used to convert a file system path to a unit name
78 see
79 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
80
81 <para>For each automount unit file a matching mount unit file (see
82 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83 for details) must exist which is activated when the automount path
84 is accessed. Example: if an automount unit
85 <filename>home-lennart.automount</filename> is active and the user
86 accesses <filename>/home/lennart</filename> the mount unit
87 <filename>home-lennart.mount</filename> will be activated.</para>
88
89 <para>Automount units may be used to implement on-demand mounting
90 as well as parallelized mounting of file systems.</para>
91
92 <para>If an automount point is beneath another mount point in the
93 file system hierarchy, a dependency between both units is created
94 automatically.</para>
95 </refsect1>
96
97 <refsect1>
98 <title><filename>fstab</filename></title>
99
100 <para>Automount units may either be configured via unit files, or
101 via <filename>/etc/fstab</filename> (see
102 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
103 for details).</para>
104
105 <para>For details how systemd parses
106 <filename>/etc/fstab</filename> see
107 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
108
109 <para>If an automount point is configured in both
110 <filename>/etc/fstab</filename> and a unit file, the configuration
111 in the latter takes precedence.</para>
112 </refsect1>
113
114 <refsect1>
115 <title>Options</title>
116
117 <para>Automount files must include an [Automount] section, which
118 carries information about the file system automount points it
119 supervises. The options specific to the [Automount] section of
120 automount units are the following:</para>
121
122 <variablelist class='unit-directives'>
123
124 <varlistentry>
125 <term><varname>Where=</varname></term>
126 <listitem><para>Takes an absolute path of a directory of the
127 automount point. If the automount point does not exist at time
128 that the automount point is installed, it is created. This
129 string must be reflected in the unit filename. (See above.)
130 This option is mandatory.</para></listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><varname>DirectoryMode=</varname></term>
135 <listitem><para>Directories of automount points (and any
136 parent directories) are automatically created if needed. This
137 option specifies the file system access mode used when
138 creating these directories. Takes an access mode in octal
139 notation. Defaults to 0755.</para></listitem>
140 </varlistentry>
141 <varlistentry>
142 <term><varname>TimeoutIdleSec=</varname></term>
143 <listitem><para>Configures an idleness timeout. Once the mount has been
144 idle for the specified time, systemd will attempt to unmount. Takes a
145 unit-less value in seconds, or a time span value such as "5min 20s".
146 Pass 0 to disable the timeout logic. The timeout is disabled by
147 default.</para></listitem>
148 </varlistentry>
149 </variablelist>
150 </refsect1>
151
152 <refsect1>
153 <title>See Also</title>
154 <para>
155 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
157 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
159 <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
160 <citerefentry project='die-net'><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
161 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
162 </para>
163 </refsect1>
164
165 </refentry>