[systemd-devel] remounting root fs outside containers as MS_SHARED

Ani Sinha ani at arista.com
Thu May 15 10:22:09 PDT 2014


On Thu, May 15, 2014 at 3:25 AM, Lennart Poettering
<lennart at poettering.net> wrote:

>> How do you propose softwares fix that?
>
> Note that systemd itself can do pivot_root() for you. See "systemctl
> switch-root". Isn't that enough for your needs?
>
> If not, please have a look how it is implemented  in systemd:
>
> http://cgit.freedesktop.org/systemd/systemd/tree/src/core/switch-root.c
>
> This code temporarily switches back to MS_PRIVATE before the switch,
> then the systemd invoked afterwards immediately switches back to
> MS_SHARED again.

IMHO, this looks like a hack to me. Was this discussed in the linux
kernel mailing list? May be you guys can convince the maintainer of
that kernel code to find a more elegant solution?

Ani


More information about the systemd-devel mailing list