systemd.mount.xml revision c485d3ba094a0bf8d0165a4ba3eb5602cc21812a
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 This file is part of systemd.
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering Copyright 2010 Lennart 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 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.
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 <refentryinfo>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </authorgroup>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refentryinfo>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refentrytitle>systemd.mount</refentrytitle>
34511ca7b166b0e89d08ff9870b0cf2624a7815fLennart Poettering <refpurpose>systemd mount configuration files</refpurpose>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <refsynopsisdiv>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <para><filename>systemd.mount</filename></para>
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering </refsynopsisdiv>
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 <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 <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 <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 <para>Optionally, a mount unit may be accompanied by
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering an automount unit, to allow on-demand or parallelized
ee48647271132188e9ecc3507e62b6c7c7a6c9ebLennart Poettering <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
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>
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 <title><filename>/etc/fstab</filename></title>
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 <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 <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
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>
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>
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 <variablelist>
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.)
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,