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

Alessandro Guido ag at alessandroguido.name
Thu Nov 25 15:26:48 UTC 2010


I'm an LXC newbie and I'm trying to migrate some OpenVZ containers.
All my containers files are located under /var/lib/lxc/<ct>/rootfs and 
/var/lib/lxc is a mounted ext4 partition. Whenever I shutdown a 
container /var/lib/lxc get remounted ro. I've found this[1] thread that 
is about the same problem, however it's unclear (at least to me) how to 
prevent that from happening without changing the guest init scripts.

I'd appreciate any help :)

[1] 
http://sourceforge.net/mailarchive/message.php?msg_id=4B9C9131.9020108%40zitta.fr


- Config -

Host: Debian Squeeze (kernel 2.6.32, lxc 0.7.2)
Guest: Debian Etch

lxc.conf:

lxc.tty = 1
lxc.pts = 1024
lxc.cgroup.devices.deny = a
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

lxc.mount.entry = /var/lib/lxc/php4/rootfs /var/lib/lxc/php4/mnt none 
bind 0 0
lxc.rootfs = /var/lib/lxc/php4/mnt

lxc.network.type = veth
lxc.network.link = lxc
lxc.network.flags = up





More information about the lxc-users mailing list