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">
7 This file is part of systemd.
9 Copyright 2010 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
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 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 <refentry id="systemd.automount">
27 <title>systemd.automount</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd.automount</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>systemd.automount</refname>
47 <refpurpose>Automount unit configuration</refpurpose>
51 <para><filename><replaceable>automount</replaceable>.automount</filename></para>
55 <title>Description</title>
57 <para>A unit configuration file whose name ends in
58 <literal>.automount</literal> encodes information
59 about a file system automount point controlled and
60 supervised by systemd.</para>
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>
71 <para>Automount units must be named after the
72 automount directories they control. Example: the
73 automount point <filename noindex='true'>/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>
80 <para>For each automount unit file a matching mount
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
91 <para>Automount units may be used to implement
92 on-demand mounting as well as parallelized mounting of
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>
101 <title><filename>fstab</filename></title>
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>
108 <para>For details how systemd parses
109 <filename>/etc/fstab</filename> see
110 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
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>
118 <title>Options</title>
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>
126 <variablelist class='unit-directives'>
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 does not
133 exist at time that the automount
134 point is installed, it is created. This
135 string must be reflected in the unit
136 filename. (See above.) This option is
137 mandatory.</para></listitem>
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
149 notation. Defaults to
150 0755.</para></listitem>
156 <title>See Also</title>
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 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>