You are not logged in.

#1 2013-06-17 15:16:49

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

[lxc] Container shutdown remounts the lxc partition read-only

Hi,

I've been playing with LXC and created a couple or arch containers using lxc-archlinux template. The containers' root filesystems are located on a separate partition mounted at /var/lib/lxc:

$ mount | grep lxc
/dev/sda3 on /var/lib/lxc type ext4 (rw,nosuid,nodev,relatime,data=ordered)
$ ls /var/lib/lxc
arch-LXC-test  lost+found

Things are mostly working, except for one issue: when the container is shutdown either from inside the guest or via lxc-stop, the entire block dev (/dev/sda3) is remounted ro.

This issue is supposed to be mitigated by opening a "hold" file to keep FS busy, e.g. /var/lib/lxc/arch-LXC-test/rootfs.hold, as discussed in https://bugs.launchpad.net/ubuntu/+sour … bug/942325 . Indeed, running strace against lxc-start yields:

$ grep hold /var/log/lxc.strace.log
open("/var/lib/lxc/arch-LXC-test/rootfs.hold", O_RDWR|O_CREAT, 0600) = 13

However, the FS is still remounted ro. What am I doing wrong?

Thanks.

Last edited by Leonid.I (2013-06-17 15:18:44)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#2 2013-06-24 12:02:04

nemster
Member
Registered: 2010-09-09
Posts: 5

Re: [lxc] Container shutdown remounts the lxc partition read-only

seems like you need to drop capabilites, i did:

lxc.cap.drop = sys_module mac_admin mac_override

Last edited by nemster (2013-06-24 13:22:14)

Offline

Board footer

Powered by FluxBB