man-pages/man5/systemd.automount.5.html
2021-03-31 01:06:50 +01:00

212 lines
5.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of SYSTEMD.AUTOMOUNT</TITLE>
</HEAD><BODY>
<H1>SYSTEMD.AUTOMOUNT</H1>
Section: systemd.automount (5)<BR>Updated: <BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
systemd.automount - Automount unit configuration
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<I>automount</I>.automount
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
A unit configuration file whose name ends in
&quot;.automount&quot;
encodes information about a file system automount point controlled and supervised by systemd.
<P>
This man page lists the configuration options specific to this unit type. See
<B><A HREF="/cgi-bin/man/man2html?5+systemd.unit">systemd.unit</A></B>(5)
for the common options of all unit configuration files. The common configuration items are configured in the generic
&quot;[Unit]&quot;
and
&quot;[Install]&quot;
sections. The automount specific configuration options are configured in the
&quot;[Automount]&quot;
section.
<P>
Automount units must be named after the automount directories they control. Example: the automount point
/home/lennart
must be configured in a unit file
home-lennart.automount. For details about the escaping logic used to convert a file system path to a unit name see
<B><A HREF="/cgi-bin/man/man2html?5+systemd.unit">systemd.unit</A></B>(5). Note that automount units cannot be templated, nor is it possible to add multiple names to an automount unit by creating additional symlinks to its unit file.
<P>
For each automount unit file a matching mount unit file (see
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5)
for details) must exist which is activated when the automount path is accessed. Example: if an automount unit
home-lennart.automount
is active and the user accesses
/home/lennart
the mount unit
home-lennart.mount
will be activated.
<P>
Automount units may be used to implement on-demand mounting as well as parallelized mounting of file systems.
<A NAME="lbAE">&nbsp;</A>
<H2>AUTOMATIC DEPENDENCIES</H2>
<A NAME="lbAF">&nbsp;</A>
<H3>Implicit Dependencies</H3>
<P>
The following dependencies are implicitly added:
<P>
<DL COMPACT><DT id="1"><DD>
&bull;
If an automount unit is beneath another mount unit in the file system hierarchy, both a requirement and an ordering dependency between both units are created automatically.
</DL>
<P>
<DL COMPACT><DT id="2"><DD>
&bull;
An implicit
<I>Before=</I>
dependency is created between an automount unit and the mount unit it activates.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H3>Default Dependencies</H3>
<P>
The following dependencies are added unless
<I>DefaultDependencies=no</I>
is set:
<P>
<DL COMPACT><DT id="3"><DD>
&bull;
Automount units acquire automatic
<I>Before=</I>
and
<I>Conflicts=</I>
on
umount.target
in order to be stopped during shutdown.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>FSTAB</H2>
<P>
Automount units may either be configured via unit files, or via
/etc/fstab
(see
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
for details).
<P>
For details how systemd parses
/etc/fstab
see
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5).
<P>
If an automount point is configured in both
/etc/fstab
and a unit file, the configuration in the latter takes precedence.
<A NAME="lbAI">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
Automount files must include an [Automount] section, which carries information about the file system automount points it supervises. The options specific to the [Automount] section of automount units are the following:
<P>
<I>Where=</I>
<DL COMPACT><DT id="4"><DD>
Takes an absolute path of a directory of the automount point. If the automount point does not exist at time that the automount point is installed, it is created. This string must be reflected in the unit filename. (See above.) This option is mandatory.
</DL>
<P>
<I>DirectoryMode=</I>
<DL COMPACT><DT id="5"><DD>
Directories of automount points (and any parent directories) are automatically created if needed. This option specifies the file system access mode used when creating these directories. Takes an access mode in octal notation. Defaults to 0755.
</DL>
<P>
<I>TimeoutIdleSec=</I>
<DL COMPACT><DT id="6"><DD>
Configures an idle timeout. Once the mount has been idle for the specified time, systemd will attempt to unmount. Takes a unit-less value in seconds, or a time span value such as &quot;5min 20s&quot;. Pass 0 to disable the timeout logic. The timeout is disabled by default.
</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+systemctl">systemctl</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.unit">systemd.unit</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+automount">automount</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?7+systemd.directives">systemd.directives</A></B>(7)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">AUTOMATIC DEPENDENCIES</A><DD>
<DL>
<DT id="11"><A HREF="#lbAF">Implicit Dependencies</A><DD>
<DT id="12"><A HREF="#lbAG">Default Dependencies</A><DD>
</DL>
<DT id="13"><A HREF="#lbAH">FSTAB</A><DD>
<DT id="14"><A HREF="#lbAI">OPTIONS</A><DD>
<DT id="15"><A HREF="#lbAJ">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:06 GMT, March 31, 2021
</BODY>
</HTML>