Centos cgconfig无法启动 [英] Centos cgconfig fails to start

查看:3991
本文介绍了Centos cgconfig无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的一台服务器上安装Docker,每当我尝试启动docker服务时,都会因为cgconfig而失败。 Cgconfig引发以下错误:

 启动cgconfig服务:错误:无法将cpu挂载到/ cgroup / cpu:没有这样的文件或目录
/ sbin / cgconfigparser;错误加载/etc/cgconfig.conf:Cgroup安装失败
无法解析/etc/cgconfig.conf或/etc/cgconfig.d [FAILED]

我正在使用以下/etc/cgconfig.conf文件运行CentOS 6.5 Final:

  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;
}

我感谢任何回应

解决方案

要在较新版本的CentOS上使用cgroup,您需要安装 libcgroup 以及 libcgroup-工具

  $ sudo yum install libcgroup 
$ sudo yum install libcgroup-tools

要创建组使用 cgcreate ,例如: / p>

  $ sudo cgcreate -g memory,cpu,blkio,cpuset:userlimited 
pre>

要验证 /etc/cgconfig.conf 是否正确使用 cgconfigparser

  $ cgconfigparser -l /etc/cgconfig.conf 

有关详细信息,请查看: https://wiki.archlinux.org/index.php/cgroups



注意:在CentOS 6和更早版本中,只需安装 libcgroup


I need docker installed on one of my servers, and whenever I try to start the docker service, it fails because of cgconfig. Cgconfig throws the following error:

Starting cgconfig service: Error: cannot mount cpu to /cgroup/cpu: No such file or directory
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d      [FAILED]

I'm running CentOS 6.5 Final with the following /etc/cgconfig.conf file:

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;
}

I appreciate any responses

解决方案

To use cgroups on newer versions of CentOS you need to install libcgroup as well as libcgroup-tools:

$ sudo yum install libcgroup
$ sudo yum install libcgroup-tools

To create group use cgcreate, e.g.:

$ sudo cgcreate -g memory,cpu,blkio,cpuset:userlimited

To verify that /etc/cgconfig.conf is correct use cgconfigparser

$ cgconfigparser -l /etc/cgconfig.conf

For details check: https://wiki.archlinux.org/index.php/cgroups

Note: In CentOS 6 and earlier versions one only needed to install libcgroup

这篇关于Centos cgconfig无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆