On Fri, Jun 25, 2010 at 07:49:44AM +0200, jason@netkosice.sk wrote:
> maybe small example will be more suitable :)
>
> # vserver ftp exec mkdir /tmp/mnt
> # vserver ftp exec ls -a /tmp/mnt
> . ..
> # mount --bind /var/mail/ /var/lib/vservers/ftp/tmp/mnt/
vv this happens in the host namespace ^^
> # ls /var/lib/vservers/ftp/tmp/mnt/
> root
> # vserver ftp exec ls -a /tmp/mnt
> . ..
vv ofcourse the guest namespace is not affected ^^
> # vserver ftp enter
> # cd /tmp/mnt/
> # ls -a
> . ..
> # exit
> # vserver ftp restart
now the guest namespace is recreated as a copy
of the host namespace (plus some cleanup done by
util-vserver)
> [...]
> # vserver ftp exec ls /tmp/mnt
> root
vv unmounting in the host namespace ...
> # umount /var/lib/vservers/ftp/tmp/mnt/
vv ofcourse does not affect the guest namespace
(without explicit inheritance)
> # vserver ftp exec ls /tmp/mnt
> root
again, recreating the guest namespace as copy
will yield the expected result ...
> # vserver ftp restart
> [...]
> # vserver ftp exec ls -a /tmp/mnt
> . ..
seems to me you are discovering filesystem
namespaces for the first time :)
best,
Herbert
> > this really depends on the setup (i.e. more detail
> > about the directories is required), but in general,
> > if a mount is only visible inside guest A, then
> > you won't have the mechanisms to mount it into a
> > namespace belonging to e.g. guest B. if the mount
> > is shared with the host OTOH, it should be rather
> > simple to bind mount it into the guest ....
> >
> > in general it is advised to share a host directory
> > tree with both guests (A and B) instead of trying
> > to share a guest A specific filesystem with guest B.
> >
> >> When using vnamespace command I can see only empty
> >> directory :(
> >
> > before or after the mount, on the host or guest and
> > in the guest setup namespace or in the actual guest
> > namespace? :)
> >
> >
> > best,
> > Herbert
> >
>
Received on Fri Jun 25 18:31:24 2010