Re: [Vserver] Mounting /vservers/vs, prepre-start script and namespace

From: Oliver Heinz <oliver.heinz_at_schunk.net>
Date: Tue 21 Nov 2006 - 09:29:21 GMT
Message-Id: <200611211029.21810.oliver.heinz@schunk.net>

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 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.

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
Received on Tue Nov 21 09:32:38 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 21 Nov 2006 - 09:32:44 GMT by hypermail 2.1.8