Hacmp 5.1 配置手冊---牛新莊(1)

                                 HACMP 配置手冊牛新莊

Hacmp 5.1 配置手冊

一, Hacmp 的軟件安裝。

1. 安裝前提
如果您的操作系統是AIX5.1 ,那麼您要安裝維護補丁包ML03以上,目前
最高的補丁版本是ML05. 並且您還要安裝RSCT 2.2.1.30 或更高版本。
以下的包也是必須要安裝的:
  bos.adt.lib
 bos.adt.libm
 bos.adt.syscalls
 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.odm
如果您要安裝並行的資源組,還要安裝下面的包:
  bos.rte.lvm.rte5.1.0.25 or higher
 bos.clvm.enh.
2. 開始安裝
一般基本上除了haview ,netwiew ( Tivoli),的包以外,所有的hacmp的包都要安裝。
3. 打補丁。
注意,客戶總是忽略給hacmp打補丁這一步驟。其實對hacmp來說,補丁是十分重要的。很多
發現的缺陷都已經在補丁中被解決了。有的客戶嚴格的按照正確步驟安裝和配置完hacmp的軟
件後,發現takeover 有問題,ip接管有問題,機器自動宕機等等千奇百怪的問題,其實都與補

有關。所以客戶一定要注意打補丁這個環節。現在hacmp最新的補丁是:
IY53044 - Latest HACMP for AIX R510 Fixes as of January 2004
大家可以從IBM網站上下載。
4. 重啓機器。在hacmp 5。1 中爲了安全起見,不再使用/.rhosts 文件來控制兩臺機器
之間的命令和數據交換,而是引進的一個新的進程clcomd 。如果你編輯/etc/inittab文

就會發現安裝完hacmp後,在最後添加了一行:clcomdES:2:once:startsrc -s clcomdES
>/dev/console 2>&1 。因此重新啓機後, ps –ef |grep clomd ,會發現:root 12908 6478
0 Apr 12 - 0:21 /usr/es/sbin/cluster/clcomd –d ,證明該進程啓動了。
Hacmp5.1使用
/usr/es/sbin/cluster/etc/rhosts 文件來代替 /.rhosts 文件的功能。
注意:如果兩個節點間的通訊發生了什麼問題,可以檢查rhots 文件,或者編輯rhosts文件
加入兩個節點的網絡信息。

二,hacmp5.1 的配置

我們以兩臺機器爲例:test1 和test2 , 共享三塊7133 硬盤。
1. 首先配置兩臺機器的ip 和vg , 以及/etc/hosts 和application 啓動/停止腳本
test1:/>netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.4.ac.49.f2.d5 77960 0 47805 0 0
en0 1500 100.1 100.1.0.1 77960 0 47805 0 0
en1 1500 link#3 0.6.29.ec.44.d6 33 0 11 0 0
en1 1500 192.168.0 192.168.0.1 33 0 11 0 0
test2:/>netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.4.ac.49.60.23 31138 0 82582 0 0
en0 1500 100.1 100.1.0.2 31138 0 82582 0 0
en1 1500 link#3 0.4.ac.3e.b9.4b 36 0 13 0 0
en1 1500 192.168.0 192.168.0.2 36 0 13 0 0
test1 :
hdisk0 0004383268b07574 rootvg active
hdisk3 000438325e22bca7 test1vg
hdisk4 00043832125e5aa8 None
hdisk5 000438323d0e4487 None
test2 :
hdisk0 000d29574085126d rootvg active
hdisk5 000438325e22bca7 test1vg
hdisk6 00043832125e5aa8 None
hdisk7 000438323d0e4487 None
/etc/hosts
100.1.0.2 test2_boot1 test2
100.1.0.1 test1_boot1 test1
192.168.0.1 test1_boot2
192.168.0.2 test2_boot2
10.1.0.1 test1_svc
10.1.0.2 test2_svc
10.1.0.5 test1_per
10.1.0.6 test1_per
test2:/ha51>ls –l
-rwxr-xr-x 1 root system 65 Apr 13 13:51 start
-rw-r--r-- 1 root system 31 Apr 13 11:49 start.log
-rwxr-xr-x 1 root system 66 Apr 13 14:01 start1
-rw-r--r-- 1 root system 31 Apr 13 14:01 start1.log
-rwxrwxrwx 1 root system 64 Apr 13 11:48 stop
-rw-r--r-- 1 root system 31 Apr 13 11:48 stop.log
-rwxr-xr-x 1 root system 66 Apr 13 14:01 stop1
-rw-r--r-- 1 root system 31 Apr 13 14:01 stop1.log
vi start
date >> /ha51/start.log
banner " start app1 " >> /tmp/hacmp.out
vi stop
date >> /ha51/stop.log
banner "stop app1 " >> /tmp/hacmp.out
vi start1
date >> /ha51/start1.log
banner " start app2 " >> /tmp/hacmp.out
vi stop1
date >> /ha51/stop1.log
banner "stop app2 " >> /tmp/hacmp.out
注意:在兩個節點要保證hosts 和啓動/停止腳本要一樣存在。
2. 用smitty hacmp 來配置hacmp
添加 cluster 和node
smitty hacmp
Initialization and Standard Configuration
Extended Configuration
System Management (C-SPOC)
Problem Determination Tools
Add Nodes to an HACMP Cluster
Configure Resources to Make Highly Available
Configure HACMP Resource Groups
Verify and Synchronize HACMP Configuration
Display HACMP Configuration
* Cluster Name [ha51tsc]
New Nodes (via selected communication paths) [m [test2_boot1
test1_boot1]
Currently Configured Node(s)
這一部很重要,一般我們都是把每個節點的boot1 作爲communication path . New node
可以一起加,也可以一個一個的加。當回車以後,系統會自己discover hacmp 的資源
顯示如下:
。。。。。。。。。。。。。。。。。。。。
IP Network Discovery completed normally
Current cluster configuration:
No resource groups defined
Cluster Description of Cluster: ha51tsc
Cluster Security Level: Standard
There are 2 node(s) and 1 network(s) defined
NODE test1:
Network net_ether_02
test1_boot1 100.1.0.1
test1_boot2 192.168.0.1
NODE test2:
Network net_ether_02
test2_boot1 100.1.0.2
test2_boot2 192.168.0.2
。。。。。。。。。。。。。。。。。。。。。。
添加高可用資源(service ip , application server , vg and jfs )
添加服務ip 地址
Add Nodes to an HACMP Cluster
Configure Resources to Make Highly Available
Configure HACMP Resource Groups
Verify and Synchronize HACMP Configuration
Display HACMP Configuration
Configure Service IP Labels/Addresses
Configure Application Servers
Configure Volume Groups, Logical Volumes and Filesystems
Configure Concurrent Volume Groups and Logical Volumes
Add a Service IP Label/Address
Change/Show a Service IP Label/Address
Remove Service IP Label(s)/Address(es)
* IP Label/Address [test1_svc ]
Network Name [net_ether_02 ]
* IP Label/Address [test2_svc ]
Network Name [net_ether_02 ]
添加 application server
Configure Service IP Labels/Addresses
Configure Application Servers
Configure Volume Groups, Logical Volumes and Filesystems
Configure Concurrent Volume Groups and Logical Volumes
Add an Application Server
Change/Show an Application Server
Remove an Application Server
* Server Name [app1]
* Start Script [/ha51/start]
* Stop Script [/ha51/stop]
* Server Name [app2]
* Start Script [/ha51/start1]
* Stop Script [/ha51/stop1]
添加共享 vg , jfs
注意在前面的步驟中我們看到已經有一個共享VG test1vg 存在了,它使用傳統的方法:
1. 在 test1 節點上創建test1vg , lv,jfs
2. Varyoffvg
3. 在 test2 上 importvg
4. Varyoffvg
現在我們試着用hacmp 的功能去創建test2vg
Configure Service IP Labels/Addresses
Configure Application Servers
Configure Volume Groups, Logical Volumes and Filesystems
Configure Concurrent Volume Groups and Logical Volumes
Shared Volume Groups
Shared Logical Volumes
Shared File Systems
Synchronize Shared LVM Mirrors
Synchronize a Shared Volume Group Definition
List All Shared Volume Groups
Create a Shared Volume Group
Create a Shared Volume Group with Data Path Devices
Set Characteristics of a Shared Volume Group
Import a Shared Volume Group
Mirror a Shared Volume Group
Unmirror a Shared Volume Group
在選擇菜單中同時用F7 選擇test1 和 test2
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章