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