summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-09-29 02:50:15 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-10-16 15:33:47 +0200
commit7c83d42ef8c875018918615599a4fecc3e4fbe6d (patch)
tree608b735c213a97d0548525ba068692071a03d610 /man
parentMerge pull request #29548 from poettering/sysext-varlink (diff)
downloadsystemd-7c83d42ef8c875018918615599a4fecc3e4fbe6d.tar.xz
systemd-7c83d42ef8c875018918615599a4fecc3e4fbe6d.zip
mount-util: use mount beneath to replace previous namespace mount
Instead of mounting over, do an atomic swap using mount beneath, if available. This way assets can be mounted again and again (e.g.: updates) without leaking mounts.
Diffstat (limited to 'man')
-rw-r--r--man/org.freedesktop.systemd1.xml11
-rw-r--r--man/systemctl.xml8
2 files changed, 16 insertions, 3 deletions
diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml
index 7247f3d2fc..d8319318a9 100644
--- a/man/org.freedesktop.systemd1.xml
+++ b/man/org.freedesktop.systemd1.xml
@@ -1310,11 +1310,16 @@ node /org/freedesktop/systemd1 {
<function>TryRestartUnit()</function> or <function>ReloadOrTryRestartUnit()</function> for the marked
units.</para>
- <para><function>BindMountUnit()</function> can be used to bind mount new files or directories into
- a running service mount namespace.</para>
+ <para><function>BindMountUnit()</function> can be used to bind mount new files or directories into a
+ running service mount namespace. If supported by the kernel, any prior mount on the selected target
+ will be replaced by the new mount. If not supported, any prior mount will be over-mounted, but remain
+ pinned and inaccessible.
+ </para>
<para><function>MountImageUnit()</function> can be used to mount new images into a running service
- mount namespace.</para>
+ mount namespace. If supported by the kernel, any prior mount on the selected target will be replaced
+ by the new mount. If not supported, any prior mount will be over-mounted, but remain pinned and
+ inaccessible.</para>
<para><function>KillUnit()</function> may be used to kill (i.e. send a signal to) all processes of a
unit. It takes the unit <varname>name</varname>, an enum <varname>who</varname> and a UNIX
diff --git a/man/systemctl.xml b/man/systemctl.xml
index d07c8eae28..a673c18c0e 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -663,6 +663,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
</para>
+ <para>If supported by the kernel, any prior mount on the selected target will be replaced by the
+ new mount. If not supported, any prior mount will be over-mounted, but remain pinned and
+ inaccessible.</para>
+
<xi:include href="version-info.xml" xpointer="v248"/></listitem>
</varlistentry>
@@ -693,6 +697,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
</para>
+ <para>If supported by the kernel, any prior mount on the selected target will be replaced by the
+ new mount. If not supported, any prior mount will be over-mounted, but remain pinned and
+ inaccessible.</para>
+
<para>Example:
<programlisting>systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid</programlisting>
<programlisting>systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img</programlisting>