I have Ubuntu 21.10 installed. I have confirmed that I am using cgroup v2 by running mount, which shows cgroup2 on /sys/fs/cgroup type cgroup2.
When I want to use cgcreate from cgroup-tools to create a new group for cpu:
sudo cgcreate -g cpu:newgroup # or
sudo cgcreate -g all:newgroup
it fails with error:
cgcreate: libcgroup initialization failed: Cgroup is not mounted
I have several questions:
- Is this because
cgroup-toolsis for cgroup v1? - What should I use to create new cgroups for cgroup v2?
- How to create persistent cgroups (when booting) using config files for cgroup v2?