Show Table of Contents
2.11. 卸载控制组群
警告
cgclear 目录将破坏所有层级中的所有 cgroup。如果您没有在配置文件中保存这些层级,则您无法再次构建它们。
要清除整个 cgroup 文件系统,请使用
cgclear 命令。
将该 cgroup 中的所有任务重新分配到该层级的 root 节点中;删除所有 cgroup;从该系统中卸载这个文件系统;这样就破坏了所有之前挂载的层级。最后,实际上是删除了挂载该 cgroup 文件系统的目录。
注意
使用
mount 命令创建 cgroup(与使用 cgconfig 服务创建它们相反),结果是在 /etc/mtab 文件(挂载的文件系统表)中生成一个条目。这个更改还在 /proc/mounts 有所体现。但是使用 cgclear 命令卸载 cgroup,与 cgconfig 命令一同使用直接内核界面则不会在 /etc/mtab 文件中有所体现,而只是在 /proc/mounts 文件中写入新信息。因此使用 cgclear 命令卸载 cgroup 仍可在 /etc/mtab 文件中看出来,且在随后执行 mount 命令时显示。所有挂载 cgroup 的准确列表,建议您参考 /proc/mounts 文件。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.