[Linux-cluster] cluster suite and webfarm + GFS ???

Lon Hohberger lhh at redhat.com
Tue Aug 15 17:22:12 UTC 2006


On Mon, 2006-08-14 at 13:45 -0400, FM wrote:
> sure here is my latest cluster.conf.
> Note that on this one the is no gfs service. I trying to fixe my httpd
> prob (httpd up on all nodes) before adding gfs in the game :-)
> thanks !
> 
> <?xml version="1.0"?>
> <cluster config_version="39" name="webfarm">
>         <fence_daemon post_fail_delay="0" post_join_delay="3"/>
>         <clusternodes>
>                 <clusternode name="lecce" votes="1">
>                         <fence>
>                                 <method name="1">
>                                         <device name="manual_fencing"
> nodename="lecce"/>
>                                 </method>
>                         </fence>
>                 </clusternode>
>                 <clusternode name="cagliari" votes="1">
>                         <fence>
>                                 <method name="1">
>                                         <device name="manual_fencing"
> nodename="cagliari"/>
>                                 </method>
>                         </fence>
>                 </clusternode>
>         </clusternodes>
>         <cman expected_votes="1" two_node="1"/>
>         <fencedevices>
>                 <fencedevice agent="fence_manual" name="manual_fencing"/>
>         </fencedevices>
>         <rm>
>                 <failoverdomains>
>                         <failoverdomain name="lecce-gfs" ordered="0"
> restricted="1">
>                                 <failoverdomainnode name="lecce"
> priority="1"/>
>                         </failoverdomain>
>                         <failoverdomain name="cagliari-gfs" ordered="0"
> restricted="1">
>                                 <failoverdomainnode name="cagliari"
> priority="1"/>
>                         </failoverdomain>
>                 </failoverdomains>
>                 <resources>
>                         <script file="/etc/init.d/httpd"
> name="httpd-lecce"/>
>                         <script file="/etc/init.d/httpd"
> name="httpd-cagliari"/>
>                 </resources>
>                 <service autostart="1" domain="lecce-gfs" name="web-lecce">
>                         <script ref="httpd-lecce"/>
>                 </service>
>                 <service autostart="1" domain="cagliari-gfs"
> name="web-cagliari">
>                         <script ref="httpd-cagliari"/>
>                 </service>
>         </rm>
> </cluster>


Thanks.

One way to make this work is to add a clusterfs resource to watch the
GFS file system, then reference it in each service (note: this does not
work with ext3).  This will cause rgmanager to monitor access to the GFS
file system.  If access to the file system fails, the service should be
stopped (but it might end up in the failed state), and piranha should
stop using the node if monitoring is set up correctly.

Something like this:

<resources>
	<script file="/etc/init.d/httpd" name="httpd-lecce"/>
	<script file="/etc/init.d/httpd" name="httpd-cagliari"/>
	<clusterfs name="mygfs" device="..." mountpoint="..."/>
</resources>
<service autostart="1" domain="lecce-gfs" name="web-lecce">
	<clusterfs ref="mygfs"/>
	<script ref="httpd-lecce"/>
</service>
<service autostart="1" domain="cagliari-gfs"
name="web-cagliari">
	<clusterfs ref="mygfs"/>
	<script ref="httpd-cagliari"/>
</service>


Note that the storage path coming back up will not trigger a restart of
the service (because services which are stopped/failed are not
monitored).

-- Lon




More information about the Linux-cluster mailing list