chiark / gitweb /
util: introduce FORMAT_BYTES_MAX
[elogind.git] / man / systemd.automount.xml
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
12   under the terms of the GNU General Public License as published by
13   the Free Software Foundation; either version 2 of the License, or
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
19   General Public License for more details.
20
21   You should have received a copy of the GNU General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd.automount">
26         <refentryinfo>
27                 <title>systemd.automount</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.automount</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd.automount</refname>
47                 <refpurpose>systemd automount configuration files</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>systemd.automount</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>A unit configuration file whose name ends in
58                 <filename>.automount</filename> encodes information
59                 about a file system automount point controlled and
60                 supervised by systemd.</para>
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                 automount specific configuration options are configured
69                 in the [Automount] section.</para>
70
71                 <para>Automount units must be named after the
72                 automount directories they control. Example: the
73                 automount point <filename>/home/lennart</filename>
74                 must be configured in a unit file
75                 <filename>home-lennart.automount</filename>. For
76                 details about the escaping logic used to convert a
77                 file system path to a unit name see
78                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
79
80                 <para>For each automount unit file a matching mount
81                 unit file (see
82                 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83                 for details) must exist which is activated when the
84                 automount path is accessed. Example: if an automount
85                 unit <filename>home-lennart.automount</filename> is
86                 active and the user accesses
87                 <filename>/home/lennart</filename> the mount unit
88                 <filename>home-lennart.mount</filename> will be
89                 activated.</para>
90
91                 <para>Automount units may be used to implement
92                 on-demand mounting as well as parallelized mounting of
93                 file systems.</para>
94
95                 <para>If an automount point is beneath another mount
96                 point in the file system hierarchy a dependency
97                 between both units is created automatically.</para>
98         </refsect1>
99
100         <refsect1>
101                 <title><filename>fstab</filename></title>
102
103                 <para>Automount units may either be configured via unit
104                 files, or via <filename>/etc/fstab</filename> (see
105                 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
106                 for details).</para>
107
108                 <para>For details how systemd parses
109                 <filename>/etc/fstab</filename> see
110                 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
111
112                 <para>If an automount point is configured in both
113                 <filename>/etc/fstab</filename> and a unit file the
114                 configuration in the latter takes precedence.</para>
115         </refsect1>
116
117         <refsect1>
118                 <title>Options</title>
119
120                 <para>Automount files must include an [Automount]
121                 section, which carries information about the file
122                 system automount points it supervises. The options
123                 specific to the [Automount] section of automount units
124                 are the following:</para>
125
126                 <variablelist>
127
128                         <varlistentry>
129                                 <term><varname>Where=</varname></term>
130                                 <listitem><para>Takes an absolute path
131                                 of a directory of the automount
132                                 point. If the automount point is not
133                                 existing at time of the automount
134                                 point is installed it is created. This
135                                 string must be reflected in the unit
136                                 file name. (See above.) This option is
137                                 mandatory.</para></listitem>
138                         </varlistentry>
139
140                         <varlistentry>
141                                 <term><varname>DirectoryMode=</varname></term>
142                                 <listitem><para>Directories of
143                                 automount points (and any parent
144                                 directories) are automatically created
145                                 if needed. This option specifies the
146                                 file system access mode used when
147                                 creating these directories. Takes an
148                                 access mode in octal
149                                 notation. Defaults to
150                                 0755.</para></listitem>
151                         </varlistentry>
152                 </variablelist>
153         </refsect1>
154
155         <refsect1>
156                   <title>See Also</title>
157                   <para>
158                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
159                           <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
160                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
161                           <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
162                           <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
163                           <citerefentry><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
164                   </para>
165         </refsect1>
166
167 </refentry>