On Tuesday 21 November 2006 14:06, Daniel Hokka Zakrisson wrote:
> Xavier Montagutelli wrote:
> > Hello list,
> >
> > I would like to execute a script before the vserver start. This script
> > will be in charge of mounting the /vservers/<vs> filesystem (ext3 on a
> > cluster-LVM logical volume).
> >
> > I tried using a prepre-start.d script, but it seems this part is executed
> > in the vserver namespace (I don't use the 'nonamespace' feature). So the
> > FS is correctly mounted, but I would prefer it to be mounted in the host
> > namespace.
> >
> > Is there a way to achieve this with the current util-vserver release ? Or
> > do I have to implement a sort of preprepre-start feature ? Or did I miss
> > something ?
>
> The namespace is created as one of the first steps of the process. The
> vserver script executes itself within a new namespace before it has even
> handed over control to the vserver.start script, and thus any such
> scriptlets would have to be hacked into the main vserver script.
>
> Also note that 0.30.211 does have an initialize script which is run
> basically as soon as vserver.start is in control, but even then you're
> in the guest's namespace.
OK, thank you for your answer.
So I will have to patch the vserver utility or wrap the "vserver" call in
another script.
Another question : I don't figure out completely the namespaces. Why does
"vnamespace -e 0 ..." doesn't work to escape from the newly created
namespace ?
-- Xavier Montagutelli Tel : +33 (0)5 55 45 77 20 Service Commun Informatique Fax : +33 (0)5 55 45 75 95 Universite de Limoges 123, avenue Albert Thomas 87060 Limoges cedex _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Tue Nov 21 17:40:45 2006