Cluster.conf

From SME Server
Revision as of 15:07, 23 January 2013 by RequestedDeletion (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
PythonIcon.png Skill level: Developer
Risk of inconsistencies with Koozali SME Server methodology, upgrades & functionality is high. One must be knowledgeable about how changes impact their Koozali SME Server. Significant risk of irreversible harm.


Example of /etc/cluster/cluster.conf

<?xml version="1.0"?>
<cluster name="SME-cluster" config_version="1">
    <logging debug="on"/>

    <cman cluster_id="669" two_node="1" expected_votes="1">
    </cman>
    
<!-- Open Nodes definition-->
    <clusternodes>

<!-- SME-Cluster Node 1 -->
	<clusternode name="test01.testnet.local" votes="1" nodeid="1">
	    <fence>
    		<method name="single">
        	    <device name="human"/>
		</method>
	    </fence>
	</clusternode>
  
<!-- SME-Cluster Node 2 -->
        <clusternode name="test02.testnet.local" votes="1" nodeid="2">
    	    <fence>
		<method name="single">
        	    <device name="human"/>
    	        </method>
    	    </fence>
	</clusternode>
    </clusternodes>
<!-- Close Nodes definition -->

<!-- dummy Fence device -->
    <fencedevices>
	<fencedevice name="human" agent="manual"/>
    </fencedevices>

    <fence_daemon clean_start="1">
    </fence_daemon>

<!-- Populate Resource Manager -->
    <rm>
    
<!-- Failover type and priority. test01 Node is the preferred Node when both are up-->
	<failoverdomains>
	    <failoverdomain name="only_test01" nofailback="1" ordered="0" restricted="1">
		<failoverdomainnode name="test01.testnet.local"/>
	    </failoverdomain>
	    <failoverdomain name="only_test02" nofailback="1" ordered="0" restricted="1">
		<failoverdomainnode name="test02.testnet.local"/>
	    </failoverdomain>	

	    <failoverdomain name="primary-test01" nofailback="1" ordered="1" restricted="1">
		<failoverdomainnode name="test01.testnet.local" priority="1"/>
		<failoverdomainnode name="test02.testnet.local" priority="2"/>
	    </failoverdomain>
	    <failoverdomain name="primary-test02" nofailback="1" ordered="1" restricted="1">
		<failoverdomainnode name="test01.testnet.local" priority="2"/>
		<failoverdomainnode name="test02.testnet.local" priority="1"/>
	    </failoverdomain>
	</failoverdomains>

<!-- Resources definition -->
        <resources>
	    <ip address="10.0.1.150" monitor_link="0"/>
	    <script file="/etc/rc.d/init.d/mysqld" name="mysql"/>
	    <script file="/etc/rc.d/init.d/supervise/smb" name="samba"/>
	    <script file="/etc/rc.d/init.d/httpd-admin" name="httpd-admin"/>
	    <script file="/etc/rc.d/init.d/httpd-e-smith" name="httpd-e-smith"/>
	</resources>

<!-- Services definition -->
	<service domain="only_test01" autostart="1" exclusive="0" name="primary" recovery="restart"/>
	<service domain="only_test02" autostart="1" exclusive="0" name="secondary" recovery="restart"/>

	<service name="cluster-ip" autostart="1" exclusive="0" recovery="relocate">
	    <ip ref="10.0.1.150"/>
	</service>
    
	<service name="cluster-samba" autostart="1" exclusive="0" recovery="relocate">
	    <script ref="samba"/>
	</service>

	<service name="cluster-httpd-admin" autostart="1" exclusive="0" recovery="relocate">
	    <script ref="httpd-admin"/>
	</service>

	<service name="cluster-httpd-e-smith" autostart="1" exclusive="0" recovery="relocate">
	    <script ref="httpd-e-smith"/>
	</service>

	<service name="cluster-mysql" autostart="1" exclusive="0" recovery="relocate">
	    <script ref="mysql"/>
	</service>
    </rm>

<!-- Disable redundant ring protocol only available as of RHEL6.3 - Disable encryption on private LAN-->
    <totem rrp_mode="none" secauth="off"/>
    
<!-- Close Resource Manager -->
</cluster>