Slurm on Gentoo: cannot find /sys/fs/cgroup/systemd

Slurm

Posted by JXLIU on June 19, 2023

Slurm on Gentoo

Due to some reason, slurm doesn’t work normally on Gentoo OS.

1
error: can not state /sys/fs/cgroup/systemd, no such file

This is because the cgroup initialization script did not take care of non-systemd(OpenRC) systems properly. One way to correct it is running the following command

1
2
3
4
mkdir -p /sys/fs/cgroup/systemd
mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/system
# Sometimes, the following command is needed
 mkdir -p /sys/fs/cgroup/system.slice

For slurm on Gentoo, it works well now. While, the following two command may be also needed for other applications

1
2
mkdir -p /sys/fs/cgroup/systemd/user
echo $$ > /sys/fs/cgroup/systemd/user/cgroup.procs 

Reference: github

Network on internal server

通过路由配置内网服务器通过公网服务器内网 ip 访问公网时,记得使 iptables 中的 masquarde(进行 snat 地址转换) 生效。