無法掛載cgroup

無法掛載cgroup

我一直在尋找解決這個問題的方法,但沒有一個有效。

我想啟動我的 LXC 容器,但我需要先掛載 cgroup。

[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

我讀到我需要將以下行添加到我的/etc/fstab

cgroup                  /sys/fs/cgroup          cgroup  defaults        0 0

然後我必須輸入mount /sys/fs/cgroupor mount -a

我已經完成了所有操作,但仍然收到此錯誤:

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

我使用的是帶有 3.2.60-1.el5.elrepo 核心的 CentOS 5.10。

這是我使用 dmesg 時得到的結果 |尾巴:

[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

如果你想看我的/etc/fstab內容,這裡是:

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

我必須繼續使用 LVM/home/opt像這樣,並且我需要將 lxc 版本保留在 0.6.4 上。

您對如何解決這些問題有什麼想法或解釋一下出了什麼問題嗎?

相關內容