Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been searching for a solution to this problem but none was working.

I would like to start my LXC container but i need to mount cgroup before.

[root@stag-devCentOs ~]# lxc-start -n debianLxc
lxc-start: cgroup is not mounted
lxc-start: failed to spawn '/sbin/init'
lxc-start: cgroup is not mounted

I've read that i need to add the followind line to my /etc/fstab

cgroup                  /sys/fs/cgroup          cgroup  defaults        0 0

and then i had to enter mount /sys/fs/cgroup or mount -a.

I've done everything but i'm still getting this error:

mount: wrong fs type, bad option, bad superblock on cgroup,
    missing codepage or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

I'm using CentOS 5.10 with a 3.2.60-1.el5.elrepo kernel.

Here is what i get when i'm using dmesg | tail:

[root@stag-devCentOs ~]# dmesg | tail
Bluetooth: RFCOMM ver 1.11
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
br0: no IPv6 routers present
SELinux: initialized (dev autofs, type autofs), uses genfs_contexts
SELinux: initialized (dev autofs, type autofs), uses genfs_contexts
SELinux: initialized (dev autofs, type autofs), uses genfs_contexts
SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs
SELinux: initialized (dev proc, type proc), uses genfs_contexts
SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs
SELinux: initialized (dev proc, type proc), uses genfs_contexts

If you want to see my /etc/fstab content, here it is:

LABEL=/                 /                       ext3    defaults        1 1
/dev/vglxc/lvhome       /home                   ext3    defaults        1 1
/dev/vglxc/lvopt        /opt                    ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
cgroup                  /sys/fs/cgroup          cgroup  defaults        0 0

I have to keep using LVM with /home and /opt like this and i need to keep lxc version on 0.6.4.

Do you have any idea on how to solve those issues or maybe explain what is wrong ?

share|improve this question
    
Please check with grep "cgroup" /proc/filesystem if cgroup is supported by your kernel. –  jofel Jun 26 at 8:18
    
i'm getting grep: /procfilesystem: No such file or directory does it mean my kernel isn't compatible with cgroups ? If so how can i use lxc on this system ? –  Tifa Jun 26 at 8:22
    
I meant grep: /proc/filesystem: No such file or directory, sorry i forgotten / writing my comment. –  Tifa Jun 26 at 9:01
    
Sorry, there is also a typo on my side: it is /proc/filesystems with an s at the end. –  jofel Jun 26 at 10:48
    
It gives me nodev cgroup, thanks for answering me sir. –  Tifa Jun 26 at 11:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.