diff options
author | Luca Boccassi <bluca@debian.org> | 2023-09-29 02:50:15 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-10-16 15:33:47 +0200 |
commit | 7c83d42ef8c875018918615599a4fecc3e4fbe6d (patch) | |
tree | 608b735c213a97d0548525ba068692071a03d610 /man | |
parent | Merge pull request #29548 from poettering/sysext-varlink (diff) | |
download | systemd-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.xml | 11 | ||||
-rw-r--r-- | man/systemctl.xml | 8 |
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> |