I just found this mail which describes a problem which has the same
root: http://www.spinics.net/lists/linux-fsdevel/msg92569.html:

root@xubuntu:~# mkdir tmp1
root@xubuntu:~# mkdir tmp2
root@xubuntu:~# mount -o bind /dev tmp1
root@xubuntu:~# ls tmp1/pts
root@xubuntu:~# mount -o bind /dev/pts tmp1/pts
root@xubuntu:~# ls tmp1/pts
0  1  2  3  4  5  6  ptmx
root@xubuntu:~# mount -o bind /dev tmp2
root@xubuntu:~# ls tmp1/pts tmp2/pts
tmp1/pts:
0  1  2  3  4  5  6  ptmx

tmp2/pts:
root@xubuntu:~# mount -o bind /dev/pts tmp2/pts
root@xubuntu:~# ls tmp1/pts tmp2/pts
tmp1/pts:
0  1  2  3  4  5  6  ptmx

tmp2/pts:
0  1  2  3  4  5  6  ptmx
root@xubuntu:~# grep pts /proc/mounts
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /root/tmp1/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /mnt/source/root/tmp1/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /root/tmp2/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /mnt/source/root/tmp1/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /root/tmp1/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /mnt/source/root/tmp2/pts devpts 
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0

# now you see: pts got mounted to tmp1 again and even to /mnt/source
from the first test - why???

root@xubuntu:~# umount tmp1/pts

# tmp1/pts should now be empty after unmounting, but it is mounted twice
so the files are still visible. on the other hand: why did tmp2/pts
unmount???:

root@xubuntu:~# ls tmp1/pts tmp2/pts
tmp1/pts:
0  1  2  3  4  5  6  ptmx

tmp2/pts:
root@xubuntu:~# umount tmp1/pts

# umount was possible a second time

root@xubuntu:~# ls tmp1/pts tmp2/pts
tmp1/pts:

tmp2/pts:

root@xubuntu:~#

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1574514

Title:
  Strange behaviour with mount --bind

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1574514/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to