8

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-tools is 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?
moo
  • 966
doraemon
  • 183

1 Answers1

4

The current cgroup-tools (in Ubuntu 21.10 and earlier) is 0.41 which only works with CGroups v1 and is no longer supported. Jammy (22.04) will have the new cgroup-tools version 2.0 that supports CGroups v2.

Guss
  • 3,775