[Lxc-users] Container remounts ro an host's mount

Mike Fedyk mfedyk at mikefedyk.com
Fri Dec 3 21:07:17 UTC 2010


On Sun, Nov 28, 2010 at 10:29 PM, Trent W. Buck <twb at cybersource.com.au> wrote:
> Alessandro Guido <ag at alessandroguido.name>
> writes:
>
>> Whenever I shutdown a container /var/lib/lxc get remounted ro.
>
> This is because the reboot/halt jobs in /etc/rc[06].d/ try to mount the
> root filesystem read-only before halting, and you do not disallow this
> in your /etc/lxc/<container name>.conf:
>
>    lxc.cap.drop = sys_admin
>
> Note that this will prevent *all* mount/umount/swapon/swapoff/... within
> the container, so anything you use in the container's /etc/fstab or
> /lib/init/fstab will need to be moved to lxc.mount.entry lines in your
> lxc.conf -- in particular, upstart needs /proc to work at all, and wants
> /var/run (tmpfs) for networking.  lxc 0.7.2's lxc-ubuntu contains a
> workaround for the latter that in places in the container's
> /etc/init/lxc.conf.
>

openvz solves this problem with the simfs pseudo filesystem that seems
to take a directory tree and makes it a bind mount point.  This way
each VE gets its own mount point and mount options.  A VE's mount
can't affect the mounts on the host.

When will lxc have something similar?




More information about the lxc-users mailing list