Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)
On Wed May 21, 2025 at 10:09 AM BST, Dan Purgert wrote:
As far as I know namespaces (read: poorly), the backup script would
need to execute setns(2) in order to join the previously created
namespace for your "/backup" target. But, I've only used them with
networking devices, so there may be other caveats here.
Some mechanism is also needed to persist the previously-created
namespace. I might need a PID hanging around to keep it defined.
It would be really nice if systemd just supported this kind of thing. It
has JoinsNamespaceOf= , which is very close: it's used for a secondary
process to access the mount namespace of another, but only for the
private /tmp created by PrivateTmp= , and not any other mounts.
--
Please do not CC me for listmail.
👱🏻 Jonathan Dowland
✎ jmtd@debian.org
🔗 https://jmtd.net
Reply to: