How to Configure cluster.conf Active Active Cluster


#system-config-cluster Graphical Window Interface.
we can create the cluster.conf file.

1)Create the Failover Domain
Creates Nodes with Priority.
2)Create the Resource
3)Create the the service.
3.1)Add the Resource To the Service then 
3.2)add Fail over Domain(nodes with priority).
4)1 is Higher Priority.

How to Read cluster.conf file in Fail over Domain.
1) Check the service tag
service it will try to start their service in theFail over domain.
2.1)In the Failover domain which node has highest Priority.
In that highest priority Node it will try to start their service.
2.2)If the Highest Priority node is Down, 
THEN -- It will check the next Lowest priority node.
IF LOWEST PRIORTY  Node UP then --It will run that service at lowest priority node,
when will  the Highest priority node is up. In that Time
without Human interaction service will automatically migrate from the Lowest Priority Node to Highest Priority Node.

Example of Cluster.conf file
<?xml version="1.0" ?>
<cluster config_version="9" name="Test_cluster">
    <fence_daemon post_fail_delay="0" post_join_delay="3"/>
        <clusternode name="" nodeid="1" votes="1">
        <clusternode name="" nodeid="2" votes="1">
    <cman expected_votes="1" two_node="1"/>
            <failoverdomain name="first" ordered="1" restricted="0">
                <failoverdomainnode name="" priority="1"/>
                <failoverdomainnode name="" priority="2"/>
            <failoverdomain name="second" ordered="1">
                <failoverdomainnode name="" priority="2"/>
                <failoverdomainnode name="" priority="1"/>
            <ip address="" monitor_link="1"/>
            <ip address="" monitor_link="1"/>

        <service autostart="1" domain="first" name="IP Address-55" recovery="relocate">
            <ip ref=""/>
        <service autostart="1" domain="second" name="IP Address -56" recovery="relocate">
            <ip ref=""/>

Failover Domain

1)IP Address
2)IP Address

1)IP Address -55
2)IP Address -56

Update The Cluster.conf file
# ccs_tool update /etc/cluster/cluster.conf
Config file updated from version 27 to 28
Update complete.

# cman_tool nodes
Node  Sts   Inc   Joined               Name
   1   M    632   2011-09-16 06:26:53
   2   M    636   2011-09-16 06:26:53

#ip addr list -- Get the virtual Ip Address
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 08:00:27:06:76:c7 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet scope global secondary eth0
    inet6 fe80::a00:27ff:fe06:76c7/64 scope link 

# clustat -l
Cluster Status for Test_cluster @ Fri Sep 16 06:44:36 2011
Member Status: Quorate
 Member Name                             ID   Status
 ------ ----                             ---- ------                                 1 Online, Local, rgmanager                                 2 Online, rgmanager
Service Information
------- -----------
Service Name      : service:File system Mounting
  Current State   : started (112)
  Flags           : none (0)
  Owner           :
  Last Owner      :
  Last Transition : Fri Sep 16 06:19:27 2011

Service Name      : service:IP Address
  Current State   : started (112)
  Flags           : none (0)
  Owner           :
  Last Owner      :
  Last Transition : Fri Sep 16 06:27:18 2011

Relocate the Service
-r Resource
-m Node
#clusvcadm -r service-name -m host-name
# clusvcadm -r "IP Address-55" -m
Trying to relocate service:IP Address to
service:IP Address is now running on

#watch clustat
Update the Cluster Status

Mount the NFS
</resource><netfs export="/home/jkumar" force_unmount="0" fstype="nfs" host="" mountpoint="/mnt" name="NFS" options=""/>
Mount Disk
</filesystem><fs device="/dev/sdb1" force_fsck="0" force_unmount="0" fsid="41420" fstype="ext3" mountpoint="/mnt1" name="sdb" options="" self_fence="0"/>

No comments:
Write comments