Browse Source

lxc-auto: remount /proc and /sys with relatime

Otherwise containers fail to start, if set to noatime.
Zolfa 2 years ago
parent
commit
08780406d0
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      utils/lxc/files/lxc-auto.init

+ 5
- 0
utils/lxc/files/lxc-auto.init View File

@ -64,6 +64,11 @@ stop() {
#Export systemd cgroups
boot() {
# change noatime to relative for proc and aysfs
# otherise lxc (unprivileged at least) fails to start
mount -t proc -o remount,rw,nosuid,nodev,noexec,relatime proc /proc
mount -t sysfs -o remount,rw,nosuid,nodev,noexec,relatime sysfs /sys
if [ ! -d /sys/fs/cgroup/systemd ]; then
mkdir -p /sys/fs/cgroup/systemd
mount -t cgroup -o rw,nosuid,nodev,noexec,relatime,none,name=systemd cgroup /sys/fs/cgroup/systemd


Loading…
Cancel
Save