]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.mount.xml
Merge pull request #13365 from keszybz/fix-commits-from-pr-13246
[thirdparty/systemd.git] / man / systemd.mount.xml
index cb23e5e84a0685c623ffa47cfd9f28e2ea14740a..a72a33240d94e16bc256cf4bd5c6a2114043e952 100644 (file)
@@ -1,28 +1,12 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<!--
-  SPDX-License-Identifier: LGPL-2.1+
-
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
--->
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
 
 <refentry id="systemd.mount">
   <refentryinfo>
     <title>systemd.mount</title>
     <productname>systemd</productname>
-
-    <authorgroup>
-      <author>
-        <contrib>Developer</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
-      </author>
-    </authorgroup>
   </refentryinfo>
 
   <refmeta>
@@ -50,9 +34,9 @@
     this unit type. See
     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     for the common options of all unit configuration files. The common
-    configuration items are configured in the generic [Unit] and
-    [Install] sections. The mount specific configuration options are
-    configured in the [Mount] section.</para>
+    configuration items are configured in the generic <literal>[Unit]</literal> and
+    <literal>[Install]</literal> sections. The mount specific configuration options are
+    configured in the <literal>[Mount]</literal> section.</para>
 
     <para>Additional options are listed in
     <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
     disabled. For a longer discussion see <ulink
     url="https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems">API
     File Systems</ulink>.</para>
-  </refsect1>
 
-  <refsect1>
-    <title>Implicit Dependencies</title>
-
-    <para>The following dependencies are implicitly added:</para>
-
-    <itemizedlist>
-      <listitem><para>If a mount unit is beneath another mount unit in the file
-      system hierarchy, both a requirement dependency and an ordering
-      dependency between both units are created automatically.</para></listitem>
-
-      <listitem><para>Block device backed file systems automatically gain
-      <varname>BindsTo=</varname> and <varname>After=</varname> type
-      dependencies on the device unit encapsulating the block
-      device (see below).</para></listitem>
-
-      <listitem><para>If traditional file system quota is enabled for a mount
-      unit, automatic <varname>Wants=</varname> and
-      <varname>Before=</varname> dependencies on
-      <filename>systemd-quotacheck.service</filename> and
-      <filename>quotaon.service</filename> are added.</para></listitem>
-
-      <listitem><para>Additional implicit dependencies may be added as result of
-      execution and resource control parameters as documented in
-      <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-      and
-      <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
-      </para></listitem>
-    </itemizedlist>
+    <para>The
+    <citerefentry><refentrytitle>systemd-mount</refentrytitle><manvolnum>1</manvolnum></citerefentry> command
+    allows creating <filename>.mount</filename> and <filename>.automount</filename> units dynamically and
+    transiently from the command line.</para>
   </refsect1>
 
   <refsect1>
-    <title>Default Dependencies</title>
-
-    <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
-
-    <itemizedlist>
-      <listitem><para>All mount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
-      <filename>umount.target</filename> in order to be stopped during shutdown.</para></listitem>
-
-      <listitem><para>Mount units referring to local file systems automatically gain
-      an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>.</para></listitem>
-
-      <listitem><para>Network mount units
-      automatically acquire <varname>After=</varname> dependencies on <filename>remote-fs-pre.target</filename>,
-      <filename>network.target</filename> and <filename>network-online.target</filename>. Towards the latter a
-      <varname>Wants=</varname> unit is added as well.</para></listitem>
-    </itemizedlist>
-
-    <para>Mount units referring to local and network file systems are
-    distinguished by their file system type specification. In some cases this is not sufficient (for example network
-    block device based mounts, such as iSCSI), in which case <option>_netdev</option> may be added to the mount option
-    string of the unit, which forces systemd to consider the mount unit a network mount.</para>
+    <title>Automatic Dependencies</title>
+
+    <refsect2>
+      <title>Implicit Dependencies</title>
+
+      <para>The following dependencies are implicitly added:</para>
+
+      <itemizedlist>
+        <listitem><para>If a mount unit is beneath another mount unit in the file
+        system hierarchy, both a requirement dependency and an ordering
+        dependency between both units are created automatically.</para></listitem>
+
+        <listitem><para>Block device backed file systems automatically gain
+        <varname>BindsTo=</varname> and <varname>After=</varname> type
+        dependencies on the device unit encapsulating the block
+        device (see below).</para></listitem>
+
+        <listitem><para>If traditional file system quota is enabled for a mount
+        unit, automatic <varname>Wants=</varname> and
+        <varname>Before=</varname> dependencies on
+        <filename>systemd-quotacheck.service</filename> and
+        <filename>quotaon.service</filename> are added.</para></listitem>
+
+        <listitem><para>Additional implicit dependencies may be added as result of
+        execution and resource control parameters as documented in
+        <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        and
+        <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+        </para></listitem>
+      </itemizedlist>
+    </refsect2>
+
+    <refsect2>
+      <title>Default Dependencies</title>
+
+      <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
+
+      <itemizedlist>
+        <listitem><para>All mount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
+        <filename>umount.target</filename> in order to be stopped during shutdown.</para></listitem>
+
+        <listitem><para>Mount units referring to local file systems automatically gain
+        an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>, and a
+        <varname>Before=</varname> dependency on <filename>local-fs.target</filename> unless
+        <option>nofail</option> mount option is set.</para></listitem>
+
+        <listitem><para>Network mount units
+        automatically acquire <varname>After=</varname> dependencies on <filename>remote-fs-pre.target</filename>,
+        <filename>network.target</filename> and <filename>network-online.target</filename>, and gain a
+        <varname>Before=</varname> dependency on <filename>remote-fs.target</filename> unless
+        <option>nofail</option> mount option is set. Towards the latter a
+        <varname>Wants=</varname> unit is added as well.</para></listitem>
+      </itemizedlist>
+
+      <para>Mount units referring to local and network file systems are distinguished by their file system type
+      specification. In some cases this is not sufficient (for example network block device based mounts, such as
+      iSCSI), in which case <option>_netdev</option> may be added to the mount option string of the unit, which forces
+      systemd to consider the mount unit a network mount.</para>
+    </refsect2>
   </refsect1>
 
   <refsect1>
     is detected by <command>systemd-fstab-generator</command> and the options
     are transformed so that systemd fulfills the job-control implications of
     that option.  Specifically <command>systemd-fstab-generator</command> acts
-    as though <literal>x-systemd.mount-timout=infinity,retry=10000</literal> was
+    as though <literal>x-systemd.mount-timeout=infinity,retry=10000</literal> was
     prepended to the option list, and <literal>fg,nofail</literal> was appended.
     Depending on specific requirements, it may be appropriate to provide some of
     these options explicitly, or to make use of the
     mount options are understood by systemd which influence how
     dependencies are created for mount points. systemd will create a
     dependency of type <varname>Wants=</varname> or
-    <option>Requires</option> (see option <option>nofail</option>
+    <option>Requires=</option> (see option <option>nofail</option>
     below), from either <filename>local-fs.target</filename> or
     <filename>remote-fs.target</filename>, depending whether the file
     system is local or remote.</para>
         for details.</para></listitem>
       </varlistentry>
 
-      <varlistentry>
+      <varlistentry id='device-timeout'>
         <term><option>x-systemd.device-timeout=</option></term>
 
         <listitem><para>Configure how long systemd should wait for a
       <varlistentry>
         <term><option>x-systemd.makefs</option></term>
 
-        <listitem><para>The file system or swap structure will be intialized
+        <listitem><para>The file system will be initialized
         on the device. If the device is not "empty", i.e. it contains any signature,
         the operation will be skipped. It is hence expected that this option
-        remains set even after the device has been initalized.</para>
+        remains set even after the device has been initialized.</para>
 
         <para>Note that this option can only be used in
         <filename>/etc/fstab</filename>, and will be ignored when part of the
       <varlistentry>
         <term><option>nofail</option></term>
 
-        <listitem><para>With <option>nofail</option>, this mount will
-        be only wanted, not required, by
-        <filename>local-fs.target</filename> or
-        <filename>remote-fs.target</filename>. This means that the
-        boot will continue even if this mount point is not mounted
-        successfully.</para>
+        <listitem><para>With <option>nofail</option>, this mount will be only wanted, not required, by
+        <filename>local-fs.target</filename> or <filename>remote-fs.target</filename>. Moreover the mount unit is not
+        ordered before these target units. This means that the boot will continue without waiting for the mount unit
+        and regardless whether the mount point can be mounted successfully.</para>
         </listitem>
       </varlistentry>
 
         <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>DefaultTimeoutStartSec=</varname>
-        variable.</para></listitem>
+        default value is set from <varname>DefaultTimeoutStartSec=</varname> option in
+        <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+        </para></listitem>
       </varlistentry>
     </variablelist>
 
       <para>
         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</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 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>
+        <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>systemd-mount</refentrytitle><manvolnum>1</manvolnum></citerefentry>
       </para>
   </refsect1>