]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.automount.xml
man: document automount units
[thirdparty/systemd.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 file
72 paths they reflect. Example: the automount point
73 <filename>/home/lennart</filename> must be configured
74 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 </refsect1>
96
97 <refsect1>
98 <title><filename>fstab</filename></title>
99
100 <para>Automount units may either be configured via unit
101 files, or via <filename>/etc/fstab</filename> (see
102 <citerefentry><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
111 configuration in the latter takes precedence.</para>
112 </refsect1>
113
114 <refsect1>
115 <title>Options</title>
116
117 <para>Automount files must include an [Automount]
118 section, which carries information about the file
119 system automount points it supervises. The options
120 specific to the [Automount] section of automount units
121 are the following:</para>
122
123 <variablelist>
124
125 <varlistentry>
126 <term><varname>Where=</varname></term>
127 <listitem><para>Takes an absolute path
128 of a directory of the automount
129 point. If the automount point is not
130 existing at time of the automount
131 point is installed it is created. This
132 string must be reflected in the unit
133 file name. (See above.) This option is
134 mandatory.</para></listitem>
135 </varlistentry>
136
137 <varlistentry>
138 <term><varname>DirectoryMode=</varname></term>
139 <listitem><para>Directories of automount
140 points (and any parent directories)
141 are automatically created if
142 needed. This option specifies the file
143 system access mode used when creating
144 these directories. Defaults to
145 0755.</para></listitem>
146 </varlistentry>
147 </variablelist>
148 </refsect1>
149
150 <refsect1>
151 <title>See Also</title>
152 <para>
153 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
157 <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
159 </para>
160 </refsect1>
161
162 </refentry>