Configuring PowerHA SystemMirror 7.1 For AIX 6.1

PowerHA SystemMirror 7.1 has many new features.In this article,i just show you how to use clmgr command to manage PowerHA 7.1.

一.Installing PowerHA 7.1

1.Verify following packages on both nodes:

 
 
  1. [dbserv1@root]#lslpp -L rsct.basic.rte rsct.compat.basic.hacmp rsct.compat.clients.hacmp bos.adt.lib bos.adt.libm bos.adt.syscalls bos.ahafs bos.clvm.enh bos.cluster bos.data bos.net.tcp.client bos.net.tcp.server bos.rte.SRC bos.rte.libc bos.rte.libcfg bos.rte.libcur bos.rte.libpthreads bos.rte.lvm bos.rte.odm cas.agent 

2.Edit /etc/hosts file:

 
 
  1. #For Persistent 
  2. 192.168.0.129   dbserv1-pers 
  3. 192.168.0.130   dbserv2-pers 
  4. #For Boot IP 
  5. 192.168.1.130   dbserv2-boot 
  6. 192.168.1.129   dbserv1-boot 
  7. #For Node 
  8. 10.20.144.129   dbserv1 
  9. 10.20.144.130   dbserv2 
  10. #For Service 
  11. 10.20.144.251   oracle 
  12. 10.20.144.252   db2 

3.Installing PowerHA 7.1 file sets on both nodes:

 
 
  1. [root@dbserv1 /]#loopmount -i PowerHA_v7.1.iso -o "-V cdrfs -o ro" -m /mnt  
  2. [root@dbserv1 /]#installp -aXYg -d /mnt all  

4.Adding boot and persistent ip to /etc/cluster/rhosts file on both nodes:

In PowerHA 7.1,the /usr/es/sbin/cluster/etc/rhosts file replaced by /etc/cluster/rhosts file.

 
 
  1. [dbserv1@root]#cat /etc/cluster/rhosts 
  2. 192.168.1.130 
  3. 192.168.1.129 
  4. 192.168.0.129 
  5. 192.168.0.130 
  6. 10.20.144.129 
  7. 10.20.144.130 

5.Creating share volume group:

 
 
  1. //on dbserv1 do following steps 
  2. [root@dbserv1 /]#mkvg -V 48 -y datavg hdisk2   
  3. 0516-1254 mkvg: Changing the PVID in the ODM.    
  4. datavg  
  5. [root@dbserv1 /]#mklv -y lv02 -t jfs2 datavg 10G   
  6. lv02   
  7. [root@dbserv1 /]#crfs -v jfs2 -d /dev/lv02 –m /oradata 
  8. [root@dbserv1 /]#chvg -c datavg            //change the datavg to Enhanced Concurrent Capable volume group when you create  volume group by mkvg don't with -c option. 
  9. [root@dbserv1 /]#chvg -an datavg  
  10. [root@dbserv1 /]#varyoffvg datavg  
  11. [root@dbserv1 /]#exportvg datavg 
  12. //On dbserv2 import datavg volume group  
  13. [root@dbserv2 /]#importvg -V 48 -y datavg hdisk2   
  14. datavg 

6.Verifying the installed PowerHA filesets consistency on both nodes:

 
 
  1. [dbserv1@root]#lppchk -v 
  2. [dbserv1@root]#lppchk -c cluster* 

二.Creating a cluster:

1.Create a cluster:

 
 
  1. [dbserv1@root]#clmgr add cluster MySysMirror nodes=dbserv1,dbserv2 repositories=hdisk4 
  2. Cluster Name: MySysMirror 
  3. Cluster Connection Authentication Mode: Standard 
  4. Cluster Message Authentication Mode: None 
  5. Cluster Message Encryption: None 
  6. Use Persistent Labels for Communication: No 
  7. Repository Disk: None 
  8. Cluster IP Address:  
  9. There are 2 node(s) and 2 network(s) defined 
  10.  
  11. NODE dbserv1: 
  12.         Network net_ether_01 
  13.                 dbserv1 10.20.144.129 
  14.         Network net_ether_02 
  15.                 dbserv1-boot    192.168.1.129 
  16.  
  17. NODE dbserv2: 
  18.         Network net_ether_01 
  19.                 dbserv2 10.20.144.130 
  20.         Network net_ether_02 
  21.                 dbserv2-boot    192.168.1.130 
  22.  
  23. No resource groups defined 
  24. Initializing.. 
  25. Gathering cluster information, which may take a few minutes... 
  26. Processing... 
  27. Storing the following information in file 
  28. /usr/es/sbin/cluster/etc/config/clvg_config 
  29. ..................
  30. Cluster Name: MySysMirror 
  31. Cluster Connection Authentication Mode: Standard 
  32. Cluster Message Authentication Mode: None 
  33. Cluster Message Encryption: None 
  34. Use Persistent Labels for Communication: No 
  35. Repository Disk: hdisk4 
  36. Cluster IP Address:  
  37. There are 2 node(s) and 2 network(s) defined 
  38.  
  39. NODE dbserv1: 
  40.         Network net_ether_01 
  41.                 dbserv1 10.20.144.129 
  42.         Network net_ether_02 
  43.                 dbserv1-boot    192.168.1.129 
  44.  
  45. NODE dbserv2: 
  46.         Network net_ether_01 
  47.                 dbserv2 10.20.144.130 
  48.         Network net_ether_02 
  49.                 dbserv2-boot    192.168.1.130 
  50.  
  51. No resource groups defined 
  52.  
  53. Warning: There is no cluster found. 
  54. cllsclstr: No cluster defined. 
  55. cllsclstr: Error reading configuration. 
  56. Communication path dbserv1 discovered a new node. Hostname is dbserv1. Adding it to the configuration with Nodename dbserv1. 
  57. Communication path dbserv2 discovered a new node. Hostname is dbserv2. Adding it to the configuration with Nodename dbserv2. 
  58. Discovering IP Network Connectivity 
  59.  
  60. Retrieving data from available cluster nodes.  This could take a few minutes. 
  61.  
  62.         Start data collection on node dbserv1 
  63.         Start data collection on node dbserv2 
  64.         Collector on node dbserv2 completed 
  65.         Collector on node dbserv1 completed 
  66.         Data collection complete 
  67.         Completed 10 percent of the verification checks 
  68.         Completed 20 percent of the verification checks 
  69.         Completed 30 percent of the verification checks 
  70.         Completed 40 percent of the verification checks 
  71.         Completed 50 percent of the verification checks 
  72.         Completed 60 percent of the verification checks 
  73.         Completed 70 percent of the verification checks 
  74. Discovered [6] interfaces 
  75.         Completed 80 percent of the verification checks 
  76.         Completed 90 percent of the verification checks 
  77.         Completed 100 percent of the verification checks 
  78. IP Network Discovery completed normally 

The cluster name is MySysMirror and the disk hdisk4 as a repositories disk.The repositories disk is a new feature in PowerHA 7.1.

2.Adding Service IP:

Here i just use one ip for oracle database,it called oracle.

 
 
  1. [dbserv1@root]#clmgr add service_ip oracle NETWORK=net_ether_01 NETMASK=255.255.255.0 

3.Adding persistent IP:

 
 
  1. [dbserv1@root]#clmgr add persistent_ip dbserv1-pers NETWORK=net_ether_02 NODE=dbserv1 
  2. [dbserv1@root]#clmgr add persistent_ip dbserv2-pers NETWORK=net_ether_02 NODE=dbserv2 

4.Adding application_controller:

 
 
  1. [dbserv1@root]#clmgr add application_controller oradb STARTSCRIPT="/etc/Smydb" STOPSCRIPT="/etc/Kmydb"  

5.Adding Resource Group:

 
 
  1. [dbserv1@root]#clmgr add resource_group oraRG VOLUME_GROUP=datavg NODES=dbserv1,dbserv2 SERVICE_LABEL=oracle APPLICATIONS=oradb  
  2.  
  3. Auto Discover/Import of Volume Groups was set to true. 
  4. Gathering cluster information, which may take a few minutes. 

6.Syncing cluster:

 
 
  1. [dbserv1@root]#clmgr sync cluster verify=yes fix=yes 
  2. Saving existing /var/hacmp/clverify/ver_mping/ver_mping.log to /var/hacmp/clverify/ver_mping/ver_mping.log.bak 
  3. Verifying clcomd communication, please be patient. 
  4.  
  5. Verifying multicast communication with mping. 
  6.  
  7.  
  8. Committing any changes, as required, to all available nodes... 
  9. Adding any necessary PowerHA SystemMirror entries to /etc/inittab and /etc/rc.net for IPAT on node dbserv1. 
  10. Adding any necessary PowerHA SystemMirror entries to /etc/inittab and /etc/rc.net for IPAT on node dbserv2. 
  11.  
  12. Verification has completed normally. 
  13. ........................... 
  14. Remember to redo automatic error notification if configuration has changed. 
  15.  
  16. Verification has completed normally. 

7.Starting cluster on both nodes:

 
 
  1. [dbserv1@root]#clmgr online cluster start_cluster BROADCAST=false CLINFO=true 

8.Verifying cluster and resource group status:

 
 
  1. [dbserv1@root]#clmgr -a state query cluster 
  2. STATE="STABLE" 
  3. [dbserv2@root]#clmgr -a state query cluster 
  4. STATE="STABLE" 

 
 
  1. [dbserv1@root]#clmgr -a state,current_node query rg oraRG 
  2. STATE="ONLINE" 
  3. CURRENT_NODE="dbserv1" 

9.Switching resource group to another node:

 
 
  1. [dbserv1@root]#clmgr move rg oraRG node=dbserv2 
  2. Attempting to move resource group oraRG to node dbserv2. 
  3.  
  4. Waiting for the cluster to process the resource group movement request.... 
  5.  
  6. Waiting for the cluster to stabilize......... 
  7.  
  8. Resource group movement successful. 
  9. Resource group oraRG is online on node dbserv2. 
  10.  
  11.  
  12. Cluster Name: MySysMirror  
  13.  
  14. Resource Group Name: oraRG 
  15. Primary instance(s): 
  16. The following node temporarily has the highest priority for this instance: 
  17. dbserv2, user-requested rg_move performed on Tue Jul 17 15:23:11 2012 
  18.  
  19. Node                         State             
  20. ---------------------------- ---------------  
  21. dbserv1                      OFFLINE          
  22. dbserv2                      ONLINE     

三.Testing the PowerHA 7.1 cluster

Here i just simulation of a group service failure.This scenario consists of a hot-standby cluster configuration with participating nodes dbserv1 and dbserv2 with only one Ethernet network. Each node has two Ethernet interfaces. I'm going to kill the cthags process in the dbserv2 node that was hosting the resource group.

The resource group current on dbserv2:

 
 
  1. [dbserv1@root]#clmgr -a state,current_node query rg oraRG 
  2. STATE="ONLINE" 
  3. CURRENT_NODE="dbserv2" 

When i killed the cthags service on dbserv2 what will be happen?

 
 
  1. [dbserv2@root]#ps -ef|grep cthags 
  2.     root 17629232  2949152   0 15:18:00      -  0:00 /usr/sbin/rsct/bin/hagsd cthags 
  3. [dbserv2@root]#kill -9 17629232 

After killed cthags service,the dbserv2 will be halt immediately:

 
 
  1. Jul 17 16:26:57 dbserv2 daemon:notice cthags[15728736]: (Recorded using libct_ffdc.a cv 2):::Error ID: 63Y7ej0F5G/E/kK41v1738....................:::Reference ID:  :::Template ID: afa89905:::Details File:  :::Location: RSCT,pgsd.C,1.62.1.23,695                     :::GS_START_ST Group Services daemon started DIAGNOSTIC EXPLANATION HAGS daemon started by SRC. Log file is /var/ct/1rA_5YpzyHuO0ZxZ06xeuB/log/cthags/trace.  
  2. Jul 17 16:26:57 dbserv2 user:notice PowerHA SystemMirror for AIX: clexit.rc : Unexpected termination of clstrmgrES.   
  3. Jul 17 16:26:57 dbserv2 user:notice PowerHA SystemMirror for AIX: clexit.rc : Halting system immediately!!!  

And the resource group oraRG move to dbserv1:

 
 
  1. tail -f /var/hacmp/adm/cluster.log 
  2. Jul 17 16:27:08 dbserv1 user:notice PowerHA SystemMirror for AIX: NOTE: While the sync is going on, volume group can be used  
  3. Jul 17 16:27:09 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT COMPLETED: rg_move dbserv1 1 ACQUIRE 0  
  4. Jul 17 16:27:09 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT COMPLETED: rg_move_acquire dbserv1 1 0  
  5. Jul 17 16:27:09 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT START: rg_move_complete dbserv1 1  
  6. Jul 17 16:27:09 dbserv1 user:notice PowerHA SystemMirror for AIX: NOTE: While the sync is going on, volume group can be used  
  7. Jul 17 16:27:10 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT START: start_server oradb  
  8. Jul 17 16:27:10 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT COMPLETED: start_server oradb 0  
  9. Jul 17 16:27:10 dbserv1 user:notice PowerHA SystemMirror for AIX: EVENT COMPLETED: rg_move_complete dbserv1 1 0  

 
 
  1. [dbserv1@root]#clmgr -a state,current_node query rg oraRG 
  2. STATE="ONLINE" 
  3. CURRENT_NODE="dbserv1" 

For more information:

1.Using clmgr command to manage PowerHA 7.1

2.IBM PowerHA SystemMirror 7.1 for AIX

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值