aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-19 15:16:09 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-19 15:16:09 +0100
commit31a92930f7ef231069ebaf42ec2d0255abc22c25 (patch)
tree8963a345f1136e30fe1bf9069b8b78e0c192361c
parentd25a79ea717d29ceb8ecc1c97c0bc4ec8cbaf4d3 (diff)
downloaddotfiles-31a92930f7ef231069ebaf42ec2d0255abc22c25.tar.gz
dotfiles-31a92930f7ef231069ebaf42ec2d0255abc22c25.tar.bz2
dotfiles-31a92930f7ef231069ebaf42ec2d0255abc22c25.zip
docs(remote-dev): mark cgroups v2 switch as optional
Affects the whole host and requires a reboot — only worth doing if you need rootless --memory/--cpus limits. Rootless podman otherwise runs fine on cgroups v1.
-rw-r--r--remote-dev/README.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/remote-dev/README.md b/remote-dev/README.md
index a17c913..172be80 100644
--- a/remote-dev/README.md
+++ b/remote-dev/README.md
@@ -168,21 +168,22 @@ grep "^$USER:" /etc/subuid /etc/subgid || \
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 "$USER"
```
-Then enable cgroups v2 (required for rootless CPU/memory limits on
-Ubuntu 20.04, which still defaults to v1):
+Then (optional, **only** if you need rootless CPU/memory limits) enable
+cgroups v2. Ubuntu 20.04 still defaults to v1; flipping this requires a
+reboot and affects every workload on the box, so skip unless you have a
+concrete need:
```sh
sudo sed -i 's|^GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"|GRUB_CMDLINE_LINUX_DEFAULT="\1 systemd.unified_cgroup_hierarchy=1"|' /etc/default/grub
-sudo update-grub
-sudo reboot
+sudo update-grub && sudo reboot
```
-Verify after reboot:
+Verify:
```sh
-stat -fc %T /sys/fs/cgroup/ # → cgroup2fs
podman info | grep -E 'cgroupVersion|graphDriverName|networkBackend'
-# expected: cgroupVersion: v2, graphDriverName: overlay, networkBackend: netavark
+# expected: graphDriverName: overlay, networkBackend: netavark
+# cgroupVersion: v1 is fine — only blocks --memory/--cpus flags.
podman run --rm docker.io/library/alpine echo hi
```