On Tuesday 21 November 2006 10:29, Oliver Heinz wrote:
> Am Dienstag, 21. November 2006 09:48 schrieb Xavier Montagutelli:
> > 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 ?
> >
> >
> > Note : I didn't try to use the fstab or fstab.remote mechanism, because I
> > want to implement a sort of locking in the mount script, to avoid
> > mounting the same vservers LV twice at the same time.
> >
> > My goal is to have many physical servers accessing the same VG to be able
> > to mount the vservers directories (ext3 FS on different LVs) under one or
> > the other host (but not at the same time :-). The same /etc/vservers/
> > directory will be mounted under all hosts with the OCFS2 filesystem.
>
> Doesn't heartbeat do what you need here, It hast multiple lock/stonithar as
> mechanisms. And from version 2.0 on it has multinode support afaik. [1]
>
> You can use it like this: If one node fails the filesystem is mounted on
> the other node via heartbeat and a modified vservers-default script that
> looks for the corresponding /apps/init/mark ist started to get the vservers
> running (and for stopping when the other node comes back online)
We already have a service running with heartbeat v2 on two nodes (in my
experience, delicate to administer, still subject to small changes, difficult
to diagnosticate in case of problems - but great product). Perhaps, we could
ultimately use heartbeat (or redhat cluster ?) for monitoring the vservers.
But this solution would only be valuable to protect us against a failure on
the physical host (not against problem in the vserver : FS full, admin
error, ...).
> We use it here for a pure 2-node failover which operates on a shared
> storage with a non-cluster FS. I'd be interessted why you want it to be
> mounted on only one node as you use a cluster-FS with is capable of
> concurrent multinode access.
In my configuration, the vserver chroot directory is ext3, not a cluster-FS.
OCFS2 is only used to share /etc/vservers between the physical hosts. I could
also use OCFS2 for the chroot directory. But I don't want to go in a share
filesystem for this critical part : there's no *real* need for a share FS for
this, and I keep conservative for performance and administration. Moreover,
OCFS2 lacks some things, GFS2 / Lustre are not included in Linus kernel (I
don't want to add another patch on top of vserver (one day perhaps containers
and Co will be in upstream ? :-))
Cluster-LVM only allows sharing PV, VG and LV between hosts, without
compromising LVM meta-data integrity. But it doesn't guarantee mounting a LV
on one single node.
Perhaps some folks have another opinion / approach / experience ?
>
>
> Cheers,
> Oliver
>
>
> [1] http://www.linux-ha.org/GettingStartedV2
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
-- 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:29:09 2006