Subject: Re: [vserver] Mount host-fs into running vserver
From: Wilhelm Meier <wilhelm.meier@fh-kl.de>
Date: Wed, 23 Apr 2008 15:12:36 +0200

Am Mittwoch, 23. April 2008 schrieb Herbert Poetzl:
> On Fri, Apr 11, 2008 at 02:13:45PM +0200, Wilhelm Meier wrote:
> > Hallo,
> >
> > I think, this question was already answered on the list, but I
> > can't find right answer ..,
> >
> > on the host I have a directory /mnt/test and I want to bind-mount
> > this into a running vserver. I thought I have to use vnamespace
> > to do this:
> >
> > vnamespace -e test mount /mnt/test
> > /var/lib/vservers/test/mnt/test -o bind,ro
> >
> > but the files in /mnt/test don't schow up in the vserver:
> >
> > vserver test exec ls -l /mnt/test
> >
> > ist empty.
> >
> > What am I doing wrong?
>
> most likely they are not there (in /mnt/test) after
> you entered the guest's namespace with vnamespace,
> thus the bind mount succeeds, but leaves you with
> the empty mountpoint ...

yes, the bind-mount succeeds but the target is empty. I just don't 
understand why. Is there a possibility to get this done?

I made the additional attempt to mark the host-mount-point as 
make-rshared. But this did no do the trick either.

>
> instead trying to bind mount a newly on the guest
> mounted path (I assume /mnt/test is such a thing)
> simply do the /mnt/test mount inside the guest
> namespace and preferably to the right location too

If I understand that correct I have to make the device visible to the 
guest. But I don't want to do that.

>
> HTC,
> Herbert
>
> > --
> > Wilhelm



-- 
Wilhelm