[systemd-devel] systemd remounts root fs read-only, doesn't detect lxc-libvirt

Florian Klink flokli at flokli.de
Sat Sep 28 07:35:05 PDT 2013


Hi,

I setup some freshly-bootstrapped Arch Linux containers using systemd
204 (so only systemd inside, no old init systems)

They are started using libvirt-lxc.
The root of the container filesystem is a mountpoint (in my case, aufs
filesystem, to save some space and use "base images", but this is also
reproducible with a loop ext filesystem mounted on the root location).

/dev/loop0 /var/lib/libvirt/filesystems/test/root ext4
rw,relatime,data=ordered 0 0

According to src/core/umount.c, the "remount,ro" of / should not occur
when systemd is started inside a "container environment".

However, after starting up, then shutting down the container, the
filesystem is mounted ro.

/dev/loop0 /var/lib/libvirt/filesystems/test/root ext4
ro,relatime,data=ordered 0 0

So probably systemd is not detecting here correctly that it's running
inside the container, although "lxc-libvirt" as env for pid 1 seems to
be supported inside detect_container().

So something is apparently wrong here.
Is there any way to find out why it is remounting ro?

Regards,
Florian


More information about the systemd-devel mailing list