Summary: | duplicate bind mounts | ||
---|---|---|---|
Product: | systemd | Reporter: | Corey Hickey <bugfood-c> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED NOTABUG | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Corey Hickey
2014-07-24 02:27:41 UTC
systemd enables mount propagation by default for all bind mounts. This is necessary to make sure propagation by default works for container managers such as nspawn/lxc/docker/libvirt. It's recommended to turn off mount propagation if you want to disable it: mount --make-rslave /foo/bar Thanks for the explanation. I do wish the default behavior hadn't changed, but this does get me an acceptable workaround. I wasn't aware of those mount options. I think what I actually want is --make-private, i.e.: [root@dcoreytest01 mnt]# mount --bind --make-private / foo [root@dcoreytest01 mnt]# mount --bind --make-private / bar [root@dcoreytest01 mnt]# mount | egrep '(foo|bar)' /dev/vda3 on /mnt/foo type ext4 (rw,relatime,data=ordered) /dev/vda3 on /mnt/bar type ext4 (rw,relatime,data=ordered) That works fine for me. Alternatively, making / private first works as well: [root@dcoreytest01 mnt]# mount --make-private / [root@dcoreytest01 mnt]# mount --bind / foo [root@dcoreytest01 mnt]# mount --bind / bar [root@dcoreytest01 mnt]# mount | egrep '(foo|bar)' /dev/vda3 on /mnt/foo type ext4 (rw,relatime,data=ordered) /dev/vda3 on /mnt/bar type ext4 (rw,relatime,data=ordered) Thanks, Corey |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.