1 Nov 2005 01:01
Re: /etc/mtab and per-process namespaces
Ram Pai <linuxram <at> us.ibm.com>
2005-11-01 00:01:23 GMT
2005-11-01 00:01:23 GMT
On Mon, 2005-10-31 at 15:27, Rob Landley wrote: > On Monday 31 October 2005 13:11, Ram Pai wrote: > > > The big thing I've never figured out how to do is make umount -a work in > > > the presence of multiple namespaces. (Should it just umount what it > > > sees? I don't know how to umount everything because I can't find > > > everything...) > > > > Yes you won't find everything, since some of them are in a different > > namespaces. Instead unmount whatever you see. Or use /proc/mounts > > to unmount whatever is there in its namespace. > > But /proc/mounts is a symlink to self/mounts, and self is a symlink to $PID, > so after burrowing through the symlinks you wind up looking > at /proc/$PID/mounts. > > My concern is that if I have init, as root, try to perform a umount -a, it > _still_ won't get the mounts belonging to child processes with a separate > namespace. There's no "global view" of mounts available anywhere. and having a "global view" is a debatable issue. What you are asking for is a way for a process to be able to access all the mounts irrespective of which namespace it belongs to. I think 'umount -a' semantics has to be refined and made as 'unmount all the mounts belonging its namespace'. And if you agree with the semantics, than unmouting whatever is found in /proc/mounts would suffice. > > On the other hand, if we fork a child process with its own namespace, the(Continue reading)
RSS Feed