Re: [vserver] Mount fs into a already running vserver

From: Wilhelm Meier <wilhelm.meier_at_fh-kl.de>
Date: Thu 28 Feb 2008 - 09:34:44 GMT
Message-Id: <200802281034.44576.wilhelm.meier@fh-kl.de>

Am Mittwoch, 27. Februar 2008 schrieb Daniel Hokka Zakrisson:
> Wilhelm Meier wrote:
> > Am Mittwoch, 27. Februar 2008 schrieb Daniel Hokka Zakrisson:
> >> Wilhelm Meier wrote:
> >> > Hi,
> >> >
> >> > sorry, if this question was answered already ...
> >> >
> >> > How can I make mounts visible in a running vserver, if the
> >> > mounts on the host are made after the guests are started?
> >> >
> >> > E.g.:
> >> > 1) vserver vs1 start
> >> > 2) mount /dev/usb0 /mnt/test
> >> > 3) vnamespace -e vs1 mount --bind /dev/usb /test_in_vs
> >> >
> >> > but 3) doen't work as expected.
> >> >
> >> > I know the namespaces of host and guest are sperated, but I
> >> > read that with linux-namespaces I can mark a mount-object as
> >> > shared by all namespaces. Is this possible with vserver.
> >>
> >> Of course, we don't remove features, only add new ones.
> >
> > Ok, do you mean, one can mark a subtree as "shared" and all
> > mounts within that subtree are visible also to the vserver-guests
> > namespaces?
>
> Yes, they're just regular namespaces.

ok, just to be clear here:

1) mount -t tmpfs none /mnt/test
2) mount --make-rshared /mnt/test
3) vserver vs1 start
4) mkdir /mnt/test/A
5) mount -t tmpfs /mnt/test/A

this would require the util-linux-ng instead of uti-linux.

>
> >> > Or are there any other possible solution to this problem?
> >>
> >> Depending on the filesystem, vnamespace -e vs1 mount -n
> >> /dev/usb0 /vservers/vs1/test might do the trick.
> >
> > Then the /dev/usb0 dev-node must be visible inside the vs1,
> > right?
>
> And it is. The host's /dev is still accessible in the guest's
> namespace.
>
> > What I actually want to use is the aufs unification-filesystem.
> > In this case there aren't any dev-nodes, only directories.

-- 
Wilhelm
Received on Thu Feb 28 09:35:06 2008
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 28 Feb 2008 - 09:35:11 GMT by hypermail 2.1.8