]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.mount.xml
Merge pull request #16143 from fbuihuu/fstab-generator-fix
[thirdparty/systemd.git] / man / systemd.mount.xml
index 178dc188a5a2a35ea096cc96b2d0027e398834d0..9e1f5d40fd9f2837aa22b1071d10983071155247 100644 (file)
@@ -60,7 +60,7 @@
     must be run as UID 0.</para>
 
     <para>Mount units must be named after the mount point directories they control. Example: the mount point <filename
-    noindex='true'>/home/lennart</filename> must be configured in a unit file <filename>home-lennart.mount</filename>.
+    index="false">/home/lennart</filename> must be configured in a unit file <filename>home-lennart.mount</filename>.
     For details about the escaping logic used to convert a file system path to a unit name, see
     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.  Note that mount
     units cannot be templated, nor is possible to add multiple names to a mount unit by creating additional symlinks to
         system that merges multiple mount points). See
         <varname>After=</varname> and <varname>Requires=</varname> in
         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-        for details.</para></listitem>
+        for details.</para>
+
+        <para>Note that this option always applies to the created mount unit
+        only regardless whether <option>x-systemd.automount</option> has been
+        specified.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>x-systemd.before=</option></term>
         <term><option>x-systemd.after=</option></term>
 
-        <listitem><para>Configures a <varname>Before=</varname>
-        dependency or <varname>After=</varname> between the created
-        mount unit and another systemd unit, such as a mount unit.
+        <listitem><para>In the created mount unit, configures a
+        <varname>Before=</varname> or <varname>After=</varname>
+        dependency on another systemd unit, such as a mount unit.
         The argument should be a unit name or an absolute path
         to a mount point. This option may be specified more than once.
         This option is particularly useful for mount point declarations
         unit.
         See <varname>Before=</varname> and <varname>After=</varname> in
         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        for details.</para>
+
+        <para>Note that these options always apply to the created mount unit
+        only regardless whether <option>x-systemd.automount</option> has been
+        specified.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>x-systemd.wanted-by=</option></term>
+        <term><option>x-systemd.required-by=</option></term>
+
+        <listitem><para>In the created mount unit, configures a
+        <varname>WantedBy=</varname> or <varname>RequiredBy=</varname>
+        dependency on another unit.  This option may be
+        specified more than once. If this is specified, the normal
+        automatic dependencies on the created mount unit, e.g.,
+        <filename>local-fs.target</filename>, are not automatically
+        created. See <varname>WantedBy=</varname> and <varname>RequiredBy=</varname> in
+        <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         for details.</para></listitem>
       </varlistentry>
 
         <varname>Options=</varname> setting in a unit file.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>x-systemd.rw-only</option></term>
+
+        <listitem><para>If a mount operation fails to mount the file system
+        read-write, it normally tries mounting the file system read-only instead.
+        This option disables that behaviour, and causes the mount to fail
+        immediately instead. This option is translated into the
+        <varname>ReadWriteOnly=</varname> setting in a unit file.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>_netdev</option></term>
 
 
       <varlistentry>
         <term><varname>What=</varname></term>
-        <listitem><para>Takes an absolute path of a device node, file or other resource to mount. See <citerefentry
-        project='man-pages'><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. Note that the usual specifier expansion is applied to this setting,
-        literal percent characters should hence be written as <literal>%%</literal>.</para></listitem>
+        <listitem><para>Takes an absolute path of a device node, file or other resource to mount. See
+        <citerefentry
+        project='man-pages'><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. Note that the usual specifier expansion is applied
+        to this setting, literal percent characters should hence be written as <literal
+        class='specifiers'>%%</literal>. If this mount is a bind mount and the specified path does not exist
+        yet it is created as directory.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><varname>Where=</varname></term>
-        <listitem><para>Takes an absolute path of a directory for the
-        mount point; in particular, the destination cannot be a symbolic
-        link.  If the mount point does not exist at the time of
-        mounting, it is created. This string must be reflected in the
-        unit filename. (See above.) This option is
-        mandatory.</para></listitem>
+        <listitem><para>Takes an absolute path of a file or directory for the mount point; in particular, the
+        destination cannot be a symbolic link.  If the mount point does not exist at the time of mounting, it
+        is created as directory. This string must be reflected in the unit filename. (See above.) This option
+        is mandatory.</para></listitem>
       </varlistentry>
 
       <varlistentry>
 
         <listitem><para>Mount options to use when mounting. This takes a comma-separated list of options. This setting
         is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters
-        should hence be written as <literal>%%</literal>.</para></listitem>
+        should hence be written as <literal class='specifiers'>%%</literal>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         off.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><varname>ReadWriteOnly=</varname></term>
+
+        <listitem><para>Takes a boolean argument. If false, a mount
+        point that shall be mounted read-write but cannot be mounted
+        so is retried to be mounted read-only. If true the operation
+        will fail immediately after the read-write mount attempt did
+        not succeed. This corresponds with
+        <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
+        <parameter>-w</parameter> switch. Defaults to
+        off.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><varname>ForceUnmount=</varname></term>