Re: [vserver] Mount host-fs into running vserver

From: Wilhelm Meier <wilhelm.meier_at_fh-kl.de>
Date: Wed 23 Apr 2008 - 14:12:36 BST
Message-Id: <200804231512.36482.wilhelm.meier@fh-kl.de>

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
Received on Wed Apr 23 15:17:08 2008
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 23 Apr 2008 - 15:17:11 BST by hypermail 2.1.8