Re: [Vserver] Tools for VFS namespaces ?

From: Herbert Poetzl <>
Date: Wed 16 Nov 2005 - 14:48:29 GMT
Message-ID: <>

On Wed, Nov 16, 2005 at 03:24:07PM +0100, Xavier Montagutelli wrote:
> Hello list,
> I've discovered a strange (but normal) behaviour on my vserver host,
> related to namespaces and inheritance of mount points. I'm working
> with vs 2.0, kernel
> "vs1" and "vs2" are vservers, located on /vservers/vs{1,2}/. These
> directories
> are mount points for LVM logical volumes.
> To illustrate the problem :
> # vserver vs1 stop
> # umount /vservers/vs1
> # rmdir /vservers/vs1/
> rmdir: `/vservers/vs1/': Device or resource busy
> # vnamespace -e vs2 umount /vservers/v1/
> # rmdir /vservers/v1/
> #
> From what I understand : "vs1" and "vs2" have new namespaces,
> inherited from the host server. As /vserver/vs1 is mounted *before*
> vs2 is started, it appears in the namespace of "vs2".
> When "/vservers/v1/" is unmounted in the host namespace, it still
> appears to be mounted in the "vs2" namespace, so it has to be
> unmounted there too.

yep, your observations are correct ...

> This is logical, but a little bit disturbing. Are there any tools
> (apart from "vnamespace") to deal with VFS namespaces :

not that I know of ...

> having a list of namespaces,

is somewhat problematic, as each process can have
it's own namespace, so it probably would have to
walk all processes and compare/sort/unify them ...

but usually you can _assume_ one namespace per
guest context, as linux distros do not make use
of private namespaces (yet)

> knowing what appears in each,

tricky too, you can 'see' what is mounted in the
/proc/mounts entry (to some extend, as it is kind
of virtualized too) ...

> umounting in all namespaces, etc. ?

ah, interesting thing ...

> Is there a mean to control what is inherited in the namespace of a
> vserver ?

there is a 'cleanup' functionality in the kernel
(added for linux-vserver) to clean up guest namespaces
but it is currently unused, maybe we can take another
attempt on getting this one right, how about it Enrico?

anyway, if you feel like working on such stuff, or
at least want to test it/help documenting the whole
thing, please let me know, I'm sure we can arrange
something ...


> --
> Xavier Montagutelli
> Service Commun Informatique
> Universite de Limoges
> Tel : +33 555457720
> Cle GPG : 1024D/175CE198
> _______________________________________________
> Vserver mailing list
Vserver mailing list
Received on Wed Nov 16 14:48:48 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 16 Nov 2005 - 14:48:50 GMT by hypermail 2.1.8