Question About Cleanly Unmounting Slave Bind Mounts
Hi,
I asked the question on stackexchange (http://unix.stackexchange.com/questions/264931/CentOS-7-unable-to-cleanly-umount-a-bind-mount-using-rbind-and-rslave) and CentOS 7 bug report (https://bugs.CentOS.org/view.php?id=10414) but didn’t get any useful response, so I am thinking if I can get some help here.
The problem arose when I tried to rbind mount /dev and /proc to a chroot sandbox and to unmount it, I have to set the mount to slave so that unmounting submounts of
The steps to reproduce:
[hidden]$ mkdir -p A B/a C/b
[hidden]$ sudo mount –bind A B/a
[hidden]$ sudo mount –rbind B C/b
[hidden]$ sudo mount –make-rslave C/b
[hidden]$ sudo umount C/b/a
[hidden]$ sudo umount C/b
[hidden]$ rmdir C/b rmdir: failed to remove ‘C/b’: Device or resource busy
None of mount, cat /proc/mounts, cat /etc/mtab, sudo lsof, sudo fuser C/b shows any process using the directory C/b; stat C/b shows it is different inode than B, meaning it has already been unmounted successfully.
The kernel version is 3.10.0-327.10.1.el7.x86_64.
Any suggestion is welcomed.附件(0个)全部下载超大附件(0个)
Recent Comments