systemd.mount.xml revision 3519d230c8bafe834b2dac26ace49fcfba139823
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering<?xml version='1.0'?> <!--*-nxml-*-->
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering<!--
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering This file is part of systemd.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering Copyright 2010 Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering systemd is free software; you can redistribute it and/or modify it
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering under the terms of the GNU Lesser General Public License as published by
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering (at your option) any later version.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering systemd is distributed in the hope that it will be useful, but
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering Lesser General Public License for more details.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering You should have received a copy of the GNU Lesser General Public License
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering-->
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering<refentry id="systemd.mount">
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refentryinfo>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <title>systemd.mount</title>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <productname>systemd</productname>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek <authorgroup>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <author>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <contrib>Developer</contrib>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <firstname>Lennart</firstname>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <surname>Poettering</surname>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <email>lennart@poettering.net</email>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </author>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </authorgroup>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refentryinfo>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refmeta>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refentrytitle>systemd.mount</refentrytitle>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <manvolnum>5</manvolnum>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refmeta>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refnamediv>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refname>systemd.mount</refname>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refpurpose>Mount unit configuration</refpurpose>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refnamediv>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refsynopsisdiv>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para><filename><replaceable>mount</replaceable>.mount</filename></para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refsynopsisdiv>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refsect1>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <title>Description</title>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>A unit configuration file whose name ends in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <literal>.mount</literal> encodes information about a file system
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering mount point controlled and supervised by systemd.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>This man page lists the configuration options specific to
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering this unit type. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for the common options of all unit configuration files. The common
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering configuration items are configured in the generic [Unit] and
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering [Install] sections. The mount specific configuration options are
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering configured in the [Mount] section.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Additional options are listed in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering which define the execution environment the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering binary is executed in, and in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering which define the way the processes are terminated, and in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering which configure resource control settings for the processes of the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering service. Note that the User= and Group= options are not
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering particularly useful for mount units specifying a
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <literal>Type=</literal> option or using configuration not
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering specified in <filename>/etc/fstab</filename>;
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering will refuse options that are not listed in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/etc/fstab</filename> if it is not run as UID 0.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Mount units must be named after the mount point directories
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering they control. Example: the mount point
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename noindex='true'>/home/lennart</filename> must be
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering configured in a unit file <filename>home-lennart.mount</filename>.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering For details about the escaping logic used to convert a file system
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering path to a unit name, see
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Optionally, a mount unit may be accompanied by an automount
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering unit, to allow on-demand or parallelized mounting. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>If a mount point is beneath another mount point in the file
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering system hierarchy, a dependency between both units is created
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering automatically.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Mount points created at runtime (independently of unit files
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering or <filename>/etc/fstab</filename>) will be monitored by systemd
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering and appear like any other mount unit in systemd. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/proc/self/mountinfo</filename> description in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Some file systems have special semantics as API file systems
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for kernel-to-userspace and userspace-to-userspace interfaces. Some
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering of them may not be changed via mount units, and cannot be
67445f4e22ad924394acdd4fd49e6f238244a5caZbigniew Jędrzejewski-Szmek disabled. For a longer discussion see <ulink
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering url="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems">API
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering File Systems</ulink>.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refsect1>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refsect1>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <title><filename>fstab</filename></title>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>Mount units may either be configured via unit files, or via
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/etc/fstab</filename> (see
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for details). Mounts listed in <filename>/etc/fstab</filename>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering will be converted into native units dynamically at boot and when
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering the configuration of the system manager is reloaded. In general,
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering configuring mount points through <filename>/etc/fstab</filename>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering is the preferred approach. See
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace for details about the conversion.</para>
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>When reading <filename>/etc/fstab</filename> a few special
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering mount options are understood by systemd which influence how
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering dependencies are created for mount points. systemd will create a
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering dependency of type <option>Wants</option> or
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <option>Requires</option> (see option <option>nofail</option>
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek below), from either <filename>local-fs.target</filename> or
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek <filename>remote-fs.target</filename>, depending whether the file
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek system is local or remote.</para>
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek
0591220f339c313761f9a208e88fb719db566993Zbigniew Jędrzejewski-Szmek <variablelist class='fstab-options'>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace <term><option>x-systemd.requires=</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Configures a <varname>Requires=</varname> and
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering an <varname>After=</varname> dependency between the created
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace mount unit and another systemd unit, such as a device or mount
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace unit. The argument should be a unit name, or an absolute path
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace to a device node or mount point. This option may be specified
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace more than once. This option is particularly useful for mount
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace point declarations that need an additional device to be around
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace (such as an external journal device for journal file systems)
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace or an additional mount to be in place (such as an overlay file
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace system that merges multiple mount points). See
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace <varname>After=</varname> and <varname>Requires=</varname> in
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace for details.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <term><option>x-systemd.requires-mounts-for=</option></term>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Configures a
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varname>RequiresMountsFor=</varname> dependency between the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering created mount unit and other mount units. The argument must be
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering an absolute path. This option may be specified more than once.
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering See <varname>RequiresMountsFor=</varname> in
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering for details.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
774de5a97fe69da822fde77b88af8d970ab5d0c6Oleksii Shevchuk
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>x-systemd.automount</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>An automount unit will be created for the file
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering system. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for details.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>x-systemd.idle-timeout=</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Configures the idleness timeout of the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering automount unit. See <varname>TimeoutIdleSec=</varname> in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for details.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <varlistentry>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <term><option>x-systemd.device-timeout=</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Configure how long systemd should wait for a
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering device to show up before giving up on an entry from
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering <filename>/etc/fstab</filename>. Specify a time in seconds or
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering explicitly append a unit as <literal>s</literal>,
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <literal>min</literal>, <literal>h</literal>,
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering <literal>ms</literal>.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
774de5a97fe69da822fde77b88af8d970ab5d0c6Oleksii Shevchuk <para>Note that this option can only be used in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/etc/fstab</filename>, and will be
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering ignored when part of <varname>Options=</varname>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering setting in a unit file.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>noauto</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>auto</option></term>
3ef63c317481c2b3f1fe39e1b0f130aac3544522Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>With <option>noauto</option>, this mount will
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering not be added as a dependency for
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>local-fs.target</filename> or
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>remote-fs.target</filename>. This means that it will
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering not be mounted automatically during boot, unless it is pulled
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering in by some other unit. Option <option>auto</option> has the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering opposite meaning and is the default.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>nofail</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>With <option>nofail</option> this mount will
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering be only wanted, not required, by
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>local-fs.target</filename> or
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>remote-fs.target</filename>. This means that the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering boot will continue even if this mount point is not mounted
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering successfully.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><option>x-initrd.mount</option></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>An additional filesystem to be mounted in the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering initramfs. See <filename>initrd-fs.target</filename>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering description in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </variablelist>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <para>If a mount point is configured in both
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/etc/fstab</filename> and a unit file that is stored
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering below <filename>/usr</filename>, the former will take precedence.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering If the unit file is stored below <filename>/etc</filename>, it
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering will take precedence. This means: native unit files take
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering precedence over traditional configuration files, but this is
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering superseded by the rule that configuration in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <filename>/etc</filename> will always take precedence over
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering configuration in <filename>/usr</filename>.</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </refsect1>
7584d236eac91f9b7128b1eb08bddf18be2bce9fZbigniew Jędrzejewski-Szmek
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <refsect1>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <title>Options</title>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering <para>Mount files must include a [Mount] section, which carries
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering information about the file system mount points it supervises. A
7584d236eac91f9b7128b1eb08bddf18be2bce9fZbigniew Jędrzejewski-Szmek number of options that may be used in this section are shared with
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering other unit types. These options are documented in
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering and
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering The options specific to the [Mount] section of mount units are the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering following:</para>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <variablelist class='unit-directives'>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><varname>What=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Takes an absolute path of a device node, file
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering or other resource to mount. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for details. If this refers to a device node, a dependency on
067d851d30386c553e3a84f59d81d003ff638b91Daniel Wallace the respective device unit is automatically created. (See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for more information.) This option is
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering mandatory.</para></listitem>
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering </varlistentry>
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering <varlistentry>
6569cae18ed640a4e9f52f73e2a3ec54b07d0406Lennart Poettering <term><varname>Where=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Takes an absolute path of a directory of the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering mount point. If the mount point does not exist at the time of
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering mounting, it is created. This string must be reflected in the
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering unit filename. (See above.) This option is
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering mandatory.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><varname>Type=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Takes a string for the file system type. See
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering for details. This setting is optional.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><varname>Options=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Mount options to use when mounting. This takes
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering a comma-separated list of options. This setting is
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering optional.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><varname>SloppyOptions=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Takes a boolean argument. If true, parsing of
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering the options specified in <varname>Options=</varname> is
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering relaxed, and unknown mount options are tolerated. This
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering corresponds with
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <parameter>-s</parameter> switch. Defaults to
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering off.</para></listitem>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering </varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <varlistentry>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <term><varname>DirectoryMode=</varname></term>
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering <listitem><para>Directories of mount points (and any parent
41f9172f427bdbb8221c64029f78364b8dd4e527Lennart Poettering 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.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>TimeoutSec=</varname></term>
<listitem><para>Configures the time to wait for the mount
command to finish. If a command does not exit within the
configured time, the mount will be considered failed and be
shut down again. All commands still running will be terminated
forcibly via <constant>SIGTERM</constant>, and after another
delay of this time with <constant>SIGKILL</constant>. (See
<option>KillMode=</option> in
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
Takes a unit-less value in seconds, or a time span value such
as "5min 20s". Pass 0 to disable the timeout logic. The
default value is set from the manager configuration file's
<varname>DefaultTimeoutStart=</varname>
variable.</para></listitem>
</varlistentry>
</variablelist>
<para>Check
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more settings.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>