[systemd-devel] remounting root fs outside containers as MS_SHARED
Lennart Poettering
lennart at poettering.net
Thu May 15 10:24:53 PDT 2014
On Thu, 15.05.14 10:22, Ani Sinha (ani at arista.com) wrote:
> > 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?
Well, the guy in charge for this is Al Viro, and he has never replied to
any mail I ever sent to him. He thinks systemd is an abomination and
talking to us a waste of time, so I figure we have to live with the
work-around...
Note that the work-around is not too bad. When the initrd invokes
"systemctl switch-root" the nr of mounted files systems is relatively
small, hence the call should not be too inefficient...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list