[Lxc-users] cgroup mount point & systemd

Daniel Lezcano daniel.lezcano at free.fr
Sun Jan 16 09:36:49 UTC 2011


On 01/16/2011 10:10 AM, Mickaël Guérin wrote:
> Hello,
>
> I have an issue with cgroup mount point selection on my system.
> As there is no mount point named "lxc" on my system, LXC uses the first one. But it does not work (see my list of mounts).
>
> furet tmp # grep cgroup /proc/mounts
> tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
> cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=//lib64/systemd/systemd-cgroups-agent,name=systemd 0 0
> cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
> cgroup /sys/fs/cgroup/ns cgroup rw,nosuid,nodev,noexec,relatime,ns 0 0
> cgroup /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
> cgroup /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
> cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
> cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
> cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
> cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
>
>
> I get the following error from LXC:
> furet tmp # lxc-execute -n toto /usr/bin/ls
> lxc-execute: No such file or directory - failed to rename cgroup /sys/fs/cgroup/systemd/2211->/sys/fs/cgroup/systemd/toto
> lxc-execute: failed to spawn 'toto'
> lxc-execute: No such file or directory - failed to remove cgroup '/sys/fs/cgroup/systemd/toto'
>
> In the manual the solution seems to use an alternative cgroup mount point named lxc ("mount -t cgroup lxc /cgroup4lxc") but that does not work for me, as I can't mount cgroups again :
> furet tmp # mount -t cgroup lxc /cgroup/
> mount: /tmp/lxc already mounted or /cgroup/ busy
>
> Any idea ?

You need a cgroup with the ns subsystem for lxc.

In a near future, kernel 2.6.37 + lxc-0.7.4, lxc will be able to use the 
cgroup without the ns_cgroup.

More info here:

https://lists.linux-foundation.org/pipermail/containers/2010-September/025504.html

   -- Daniel




More information about the lxc-users mailing list