1

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

1

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.