systemd.mount.xml revision c485d3ba094a0bf8d0165a4ba3eb5602cc21812a
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering<?xml version='1.0'?> <!--*-nxml-*-->
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering<!--
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering This file is part of systemd.
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering Copyright 2010 Lennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering (at your option) any later version.
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering systemd is distributed in the hope that it will be useful, but
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Lesser General Public License for more details.
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering You should have received a copy of the GNU Lesser General Public License
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering-->
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering<refentry id="systemd.mount">
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refentryinfo>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <title>systemd.mount</title>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <productname>systemd</productname>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <authorgroup>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <author>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <contrib>Developer</contrib>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <firstname>Lennart</firstname>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <surname>Poettering</surname>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <email>lennart@poettering.net</email>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </author>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </authorgroup>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refentryinfo>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refmeta>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refentrytitle>systemd.mount</refentrytitle>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <manvolnum>5</manvolnum>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refmeta>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refnamediv>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refname>systemd.mount</refname>
34511ca7b166b0e89d08ff9870b0cf2624a7815fLennart Poettering <refpurpose>systemd mount configuration files</refpurpose>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refnamediv>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refsynopsisdiv>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para><filename>systemd.mount</filename></para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refsynopsisdiv>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refsect1>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <title>Description</title>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>A unit configuration file whose name ends in
4aa6e7782a1b693a8e4fa1d84c87dd76fe1e536dLennart Poettering <filename>.mount</filename> encodes information about
4aa6e7782a1b693a8e4fa1d84c87dd76fe1e536dLennart Poettering a file system mount point controlled and supervised by
4aa6e7782a1b693a8e4fa1d84c87dd76fe1e536dLennart Poettering systemd.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>This man page lists the configuration options
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering specific to this unit type. See
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering for the common options of all unit configuration
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering files. The common configuration items are configured
409dee2e44e7dc73d6bf00d782938e4cb4105f5bJan Engelhardt in the generic [Unit] and [Install] sections. The
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering mount specific configuration options are configured
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering in the [Mount] section.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>Additional options are listed in
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering which define the execution environment the
07bceef2a9c520e24da427c7ce500ad36ad37571Lennart Poettering <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering binary is executed in.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>Mount units must be named after the mount point
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering directories they control. Example: the mount point
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <filename>/home/lennart</filename> must be configured
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering in a unit file
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <filename>home-lennart.mount</filename>. For details
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering about the escaping logic used to convert a file system
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering path to a unit name see
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>Optionally, a mount unit may be accompanied by
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering an automount unit, to allow on-demand or parallelized
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering mounting. See
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>If an mount point is beneath another mount point
8f28cbcdfe55bdaaa3e8f9c68f39b1369dd0e5ddA. Costa in the file system hierarchy, a dependency between both
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering units is created automatically.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
409dee2e44e7dc73d6bf00d782938e4cb4105f5bJan Engelhardt <para>Mount points created at runtime independent on
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering unit files or <filename>/etc/fstab</filename> will be
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering monitored by systemd and appear like any other mount
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering unit in systemd.</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refsect1>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refsect1>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <title><filename>/etc/fstab</filename></title>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>Mount units may either be configured via unit
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering files, or via <filename>/etc/fstab</filename> (see
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
07bceef2a9c520e24da427c7ce500ad36ad37571Lennart Poettering for details).</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>When reading <filename>/etc/fstab</filename> a
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering few special mount options are understood by systemd
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering which influence how dependencies are created for mount
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering points from <filename>/etc/fstab</filename>. systemd
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering will create a dependency of type
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <option>Wants</option> from either
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <filename>local-fs.target</filename> or
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <filename>remote-fs.target</filename>, depending
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering whether the file system is local or remote. If
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <option>x-systemd.automount</option> is set, an
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering automount unit will be created for the file
c53158818d8cdaf46b3f1b5299b9bda118a1043fThomas Hindoe Paaboel Andersen system. See
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering for details. If
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <option>x-systemd.device-timeout=</option> is
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering specified it may be used to configure how long systemd
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering should wait for a device to show up before giving up
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering on an entry from
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering <filename>/etc/fstab</filename>. Specify a time in
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering seconds or explicitly specifiy a unit as
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering <literal>s</literal>, <literal>min</literal>,
8f28cbcdfe55bdaaa3e8f9c68f39b1369dd0e5ddA. Costa <literal>h</literal>, <literal>ms</literal>.</para>
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering
845c53246f73a505f12bb7f685a530045fa60a40Zbigniew Jędrzejewski-Szmek <para>If a mount point is configured in both
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering <filename>/etc/fstab</filename> and a unit file, the
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering configuration in the latter takes precedence.</para>
409dee2e44e7dc73d6bf00d782938e4cb4105f5bJan Engelhardt </refsect1>
76e7bc8dfbb1139254c3819f448246592f17f317Lennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refsect1>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <title>Options</title>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para>Mount files must include a [Mount] section,
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering which carries information about the file system mount points it
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering supervises. A number of options that may be used in
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering this section are shared with other unit types. These
4aa6e7782a1b693a8e4fa1d84c87dd76fe1e536dLennart Poettering options are documented in
4aa6e7782a1b693a8e4fa1d84c87dd76fe1e536dLennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering options specific to the [Mount] section of mount
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering units are the following:</para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <variablelist>
<varlistentry>
<term><varname>What=</varname></term>
<listitem><para>Takes an absolute path
of a device node, file or other
resource to mount. See
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for details. If this refers to a
device node, a dependency on the
respective device unit is
automatically created. (See
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.)
This option is
mandatory.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Where=</varname></term>
<listitem><para>Takes an absolute path
of a directory of the mount point. If
the mount point is not existing at
time of mounting, it is created. This
string must be reflected in the unit
file name. (See above.) This option is
mandatory.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Type=</varname></term>
<listitem><para>Takes a string for the
filesystem type. See
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for details. This setting is
optional.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Options=</varname></term>
<listitem><para>Mount options to use
when mounting. This takes a comma
separated list of options. This
setting is optional.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>DirectoryMode=</varname></term>
<listitem><para>Directories of mount
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.</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
SIGTERM, and after another delay of
this time with SIGKILL. (See
<option>KillMode=</option> below.)
Takes a unit-less value in seconds, or
a time span value such as "5min
20s". Pass 0 to disable the timeout
logic. Defaults to
90s.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>KillMode=</varname></term>
<listitem><para>Specifies how
processes of this mount shall be
killed. One of
<option>control-group</option>,
<option>process</option>,
<option>none</option>.</para>
<para>This option is mostly equivalent
to the <option>KillMode=</option>
option of service files. See
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>KillSignal=</varname></term>
<listitem><para>Specifies which signal
to use when killing a process of this
mount. Defaults to SIGTERM.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>SendSIGKILL=</varname></term>
<listitem><para>Specifies whether to
send SIGKILL to remaining processes
after a timeout, if the normal
shutdown procedure left processes of
the mount around. Takes a boolean
value. Defaults to "yes".
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Compatibility Options</title>
<para>The following option is also available in the
<literal>[Mount]</literal> section, but exists purely
for compatibility reasons and should not be used in
newly written mount files.</para>
<variablelist>
<varlistentry>
<term><varname>FsckPassNo=</varname></term>
<listitem><para>The pass number for
the file system checking service for
this mount. See
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information on this setting.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>