我已经引用了这篇文章: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服务的任何帮助都会有帮助。
最佳答案
$ lssubsys -a
cpu,cpuacct
如果是像“cpu,cpuacct”这样的子系统,则必须安装在同一个层次结构中(对于cg)。
关于linux - cgconfig服务无法启动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42799115/