I am trying to use recursive bind mount in a new user namespace and mount namespace.

This is what I do. Assume /foo/bar/ and /foo are both mount points. Firstly I do mount --rbind /foo/bar/ /baz, and then when I want to unmount it, I get

umount: /baz: device is busy.

I am sure that there is no other process is using /baz. Then I tried to unmount /baz/bar. This time I got

unmount: /baz/bar: not mounted.

However, I can see /baz/bar in /proc/mounts.

What is going wrong or how should I bind mount and then unmount in a new user & mount namespace?

1 Answer 1


You need umount -l which will unmount an entire tree in one system call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.