Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgroupfs-umount does not unmount /sys/fs/cgroup #7

Open
marcbachmann opened this issue Sep 15, 2017 · 2 comments
Open

cgroupfs-umount does not unmount /sys/fs/cgroup #7

marcbachmann opened this issue Sep 15, 2017 · 2 comments

Comments

@marcbachmann
Copy link

cgroupfs-mount mounts /sys/fs/cgroup but cgroupfs-umount does not unmount it.

Is there any reason for that?
I've extended my script with an umount command.

diff --git a/cgroupfs-umount b/cgroupfs-umount
index 994b66e..13458f4 100644
--- a/cgroupfs-umount
+++ b/cgroupfs-umount
@@ -28,4 +28,10 @@ for sys in *; do
   fi
 done

+# unmount /sys/fs/cgroup
+cd /sys/fs
+if mountpoint -q /sys/fs/cgroup; then
+  umount /sys/fs/cgroup
+fi
+
 exit 0
@tianon
Copy link
Owner

tianon commented Sep 22, 2017

Probably because for almost all users of this package, the only time cgroupfs-umount is ever used is at shutdown (and likely the only time it will ever actually succeed in unmounting things, unless you're very careful about your cgroups usage), so nobody's really noticed, and for those who have, having this one extra tmpfs mounted is fairly harmless. 😄

@tianon
Copy link
Owner

tianon commented Sep 22, 2017

(Additionally, these days one is hard-pressed to find users who don't already have cgroups mounted by systemd and friends, so this package/these scripts aren't getting much use or attention. 👍)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tianon @marcbachmann and others