cgconfig服务无法启动

时间:2017-03-15 00:33:50

标签: linux centos7 mount cgroups

我已经引用了这篇文章:Centos cgconfig fails to start

我有一台centos 7机器。我已尝试在以下/etc/cgconfig.conf文件中注释并留在内存中:

mount {
        cpuset  = /cgroup/cpuset;
        cpu     = /cgroup/cpu;
        cpuacct = /cgroup/cpuacct;
        memory  = /cgroup/memory;
        devices = /cgroup/devices;
        freezer = /cgroup/freezer;
        net_cls = /cgroup/net_cls;
        blkio   = /cgroup/blkio;
}

我还手动创建了该目录结构。当我运行service cgconfig start时,systemctl status cgconfig.service给了我这个:

 cgconfig.service - Control Group configuration service
   Loaded: loaded (/usr/lib/systemd/system/cgconfig.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-03-14 20:27:40 EDT; 18s ago
  Process: 6713 ExecStart=/usr/sbin/cgconfigparser -l /etc/cgconfig.conf -L /etc/cgconfig.d -s 1664 (code=exited, status=101)
 Main PID: 6713 (code=exited, status=101)

Mar 14 20:27:40 localhost.localdomain systemd[1]: Starting Control Group configuration service...
Mar 14 20:27:40 localhost.localdomain cgconfigparser[6713]: /usr/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Mar 14 20:27:40 localhost.localdomain cgconfigparser[6713]: Error: cannot mount cpu to /cgroup/cpu: Device or resource busy
Mar 14 20:27:40 localhost.localdomain systemd[1]: cgconfig.service: main process exited, code=exited, status=101/n/a
Mar 14 20:27:40 localhost.localdomain systemd[1]: Failed to start Control Group configuration service.
Mar 14 20:27:40 localhost.localdomain systemd[1]: Unit cgconfig.service entered failed state.
Mar 14 20:27:40 localhost.localdomain systemd[1]: cgconfig.service failed.

我也试过看/proc/mounts或许卸载cpu。

任何帮助启动cgconfig服务的帮助都会有所帮助。

2 个答案:

答案 0 :(得分:1)

$ lssubsys -a
cpu,cpuacct

enter image description here 如果是像“ cpu,cpuacct”这样的协子系统,则必须安装在同一层次结构(对于cg)中。

答案 1 :(得分:0)

Ubuntu 上运行我可以通过安装提供 libcgmanager {的 daemon 解决同样的问题{1}}