[systemd-devel] disabling shared mount propagation

Albert Strasheim fullung at gmail.com
Tue Apr 23 12:51:54 PDT 2013


Hello all

This change, which made mount propagation default to shared:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=b3ac5f8cb98757416d8660023d6564a7c411f0a0

and which went into Fedora 17 in January 2013:

http://lists.fedoraproject.org/pipermail/package-announce/2013-January/095395.html

is causing some headaches with some services of ours that use unshare
to get a new mount namespace and make some private mounts which we
don't want propagated.

For now, we'd simply like to revert to private mount propagation.

A code comment in the change says:

"If specific setups need other settings they can reset the propagation
mode to private if needed."

What is the recommended way to do this during early boot? Was the
fstab way of doing it (mentioned in the Git commit message) ever
implemented?

More details:

We need to reset this before any of our services run.

We are activating services to manage individual disks with
SYSTEMD_WANTS via udev, which includes mounting the file system in a
private mount namespace, via a "unshare" in the ExecStart= part.

One hack would be to have this unit do ExecStartPre="mount
--make-rprivate /" but that seems quite gross.

Any advice appreciated.

Regards

Albert


More information about the systemd-devel mailing list