Thursday, January 12, 2012

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 


   
   
       
           
       

       
           
       

   

   
   
   
       
           
                hn1.redhat.com" priority="1"/>
                hn2.redhat.com" priority="2"/>
           

           
               
               
           

       

       
           
           
       
 

       
           
       

       
           
       

   
 


Failover Domain 
1)hn1.redhat.com
2)hn2.redhat.com

Resource 
1)IP Address 151.8.18.55
2)IP Address 151.8.18.56

Service  
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  hn1.redhat.com
   2   M    636   2011-09-16 06:26:53  hn2.redhat.com

#ip addr list -- Get the virtual Ip Address
------------------------------------------------------
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 08:00:27:06:76:c7 brd ff:ff:ff:ff:ff:ff
    inet 151.8.18.53/16 brd 151.8.255.255 scope global eth0
    inet 151.8.18.55/16 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
 ------ ----                             ---- ------
 hn1.redhat.com                                 1 Online, Local, rgmanager
 hn2.redhat.com                                 2 Online, rgmanager
Service Information
------- -----------
Service Name      : service:File system Mounting
  Current State   : started (112)
  Flags           : none (0)
  Owner           : hn2.redhat.com
  Last Owner      : hn1.redhat.com
  Last Transition : Fri Sep 16 06:19:27 2011

Service Name      : service:IP Address
  Current State   : started (112)
  Flags           : none (0)
  Owner           : hn1.redhat.com
  Last Owner      : hn2.redhat.com
  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 hn2.redhat.com
Trying to relocate service:IP Address to hn2.redhat.com...Success
service:IP Address is now running on hn2.redhat.com

#watch clustat
Update the Cluster Status

Mount the NFS 

Mount Disk

0 comments:

Flag counter

free counters