is `cgroup-tools` using cgroup v1 or v2

co flag

I have ubuntu 21.10 installed. I confirmed that I am using cgroup v2 by running mount, which shows cgrup2 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?
br flag

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.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.