[systemd-devel] enabling cgroups v2
Lennart Poettering
lennart at poettering.net
Mon Sep 11 09:24:36 UTC 2023
On Fr, 08.09.23 12:57, jai (jaimin at webuzo.com) wrote:
> *ISSUE 1:*
> In ubuntu20, centos8 and almalinux8:
>
>
> *root at host:~# grep cgroup /proc/filesystemsnodev cgroupnodev cgroup2*
>
> In centos7:
>
> *root at centos:~# grep cgroup /proc/filesystemsnodev cgroup*
>
> In my centos 7, command '*grep cgroup /proc/filesystems'* does not output
> "nodev cgroup2". Does this mean cgroups v2 is not supported in it and
> cannot be enabled in it?
centos 7 is just too old.
> *ISSUE 2:*
> In my ubuntu20, centos8 and alma8 server, I enable cgroups v2 by:
> 1. adding "systemd.unified_cgroup_hierarchy=1" to GRUB_CMDLINE_LINUX in
> /etc/default/grub,
> 2. executing the command "grub2-mkconfig" or "update-grub" as root and then
> 3. reboot the server.
>
> Without reboot, cgroups v2 does not come into effect when i check using the
> below command:
>
> *root at host:~# stat -fc %T /sys/fs/cgroup/tmpfs*
>
> Is there a way this can be done without a reboot? I am looking for a way to
> enable cgroups v2 which should n't need a reboot.
no, this cannot be switched at runtime in systemd. Requires a reboot.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list