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

Lennart Poettering lennart at poettering.net
Sun Sep 29 12:59:16 PDT 2013


On Sat, 28.09.13 16:35, Florian Klink (flokli at flokli.de) wrote:

> 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?

Maybe you have listed it as such in the fstab of the container?

Does "systemd-detect-virt" in the container detect libvirt-lxc correcty?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list