启动HACMP的脚本说明
cp /ha51/db2nodes.cfg /home/db2inst1/sqllib/db2nodes.cfg(设置db2环境)
. /home/db2inst1/sqllib/db2profile
rc.db2pe.ee db2inst1 start (启动db2实例)
db2text start (启动db2全文检索)
/webapp/IBMHttpServer/bin/apachectl start (启动http)
/webapp/WebSphere/AppServer/bin/startServer.sh server1 (启动server1)
/webapp/WebSphere/AppServer/bin/startServer.sh icmrm (启动icmrm)
[@more@]安装的空间为 hacmvg
#/lspv
AUDB1/#lspv
hdisk0 0051e97e81c5ad33 rootvg active
hdisk1 none None
hdisk2 0051e97ed553b0de cmbak
hdisk3 0051e97ed553e40c hacmvg
# lsvg rootvg
AUDB1/#lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 0051e97e00004c000000010407593de4
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 546 (69888 megabytes)
MAX LVs: 256 FREE PPs: 401 (51328 megabytes)
LVs: 12 USED PPs: 145 (18560 megabytes)
OPEN LVs: 11 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
扩展文件系统:(1G =2048000 blocks)
/dev/fslv01 -- /home/db2fenc1 jfs2 2097152 rw 否 否
/dev/fslv02 -- /home/db2as jfs2 2097152 rw 否 否
/dev/fslv03 -- /home/db2inst1 jfs2 10223616 rw 否 否
/dev/fslv04 -- /fscm8db jfs2 18612224 rw 否 否
/dev/fslv05 -- /fscm8dbubos jfs2 41156608 rw 否 否
/dev/fslv06 -- /webapp jfs2 102498304 rw 否 否
/dev/fslv07 -- /icmrm jfs2 10485760 rw 否 否
/dev/fslv08 -- /fscm8dblbos jfs2 409731072 rw 否 否
此外:
Directory Required space
/ 80MB
/home 500 MB
/usr 350 MB
/var 50 MB
/tmp 200 MB
AUDB1/#netstat -ni
名称 Mtu 网络 地址 Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.11.25.8.45.2d 13040 0 4946 5 0
en0 1500 100.1 100.1.0.3 13040 0 4946 5 0
en0 1500 10.60.1 10.60.1.22 13040 0 4946 5 0
en3 1500 link#3 0.11.25.8.45.2b 24109 0 12769 3 0
en3 1500 192.168.0 192.168.0.3 24109 0 12769 3 0
lo0 16896 link#1 16521 0 16574 0 0
lo0 16896 127 127.0.0.1 16521 0 16574 0 0
lo0 16896 ::1 16521 0 16574 0 0
AUDB2/#netstat -ni
名称 Mtu 网络 地址 Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.11.25.8.42.81 12636 0 164 5 0
en0 1500 100.1 100.1.0.4 12636 0 164 5 0
en0 1500 10.60.1 10.60.1.26 12636 0 164 5 0
en3 1500 link#3 0.11.25.8.44.e8 12583 0 94 3 0
en3 1500 192.168.0 192.168.0.4 12583 0 94 3 0
lo0 16896 link#1 1684 0 1684 0 0
lo0 16896 127 127.0.0.1 1684 0 1684 0 0
lo0 16896 ::1 1684 0 1684 0 0
AUDB1的配置
AUDB1/#lspv
hdisk0 0051e97e81c5ad33 rootvg active
hdisk1 none None
hdisk2 0051e97ed553b0de cmbak
hdisk3 0051e97ed553e40c hacmvg
AUDB2的配置
AUDB2/#lspv
hdisk0 0056f7de81bd6b53 rootvg active
hdisk1 0056f7de170455d5 None
hdisk2 0051e97ed553b0de cmbak
hdisk3 0051e97ed553e40c hacmvg
AUDB1/etc/hosts的配置
127.0.0.1 loopback localhost # loopback (lo0) name/address
100.1.0.3 AUDB1_boot1 AUDB1
100.1.0.4 AUDB2_boot1 AUDB2
192.168.0.3 AUDB1_boot2
192.168.0.4 AUDB2_boot2
10.60.1.21 AUDB1_svc
10.60.1.22 AUDB1_per
10.60.1.25 AUDB2_svc
10.60.1.26 AUDB2_per
AUDB2/etc/hosts的配置
127.0.0.1 loopback localhost # loopback (lo0) name/address
100.1.0.3 AUDB1_boot1 AUDB1
100.1.0.4 AUDB2_boot1 AUDB2
192.168.0.3 AUDB1_boot2
192.168.0.4 AUDB2_boot2
10.60.1.21 AUDB1_svc
10.60.1.22 AUDB1_per
10.60.1.25 AUDB2_svc
10.60.1.26 AUDB2_per
AUDB1/ha51#ls -l
总计 40
-rwxrwxrwx 1 root system 14 6月01 22时30 db2nodes.cfg
-rwxrwxrwx 1 root system 2066 5月24 08时19 hacmp.out
-rwxrwxrwx 1 root system 1371 6月01 22时35 rc.db2pe.ee
-rwxr-xr-x 1 root system 235 6月06 16时05 startcm.sh
-rwxr-xr-x 1 root system 185 6月06 16时05 stopcm.sh
AUDB2/ha51#ls -l
总计 40
-rwxrwxrwx 1 root system 14 6月01 22时52 db2nodes.cfg
-rwxrwxrwx 1 root system 3155 5月24 15时15 hacmp.out
-r-xr--r-- 1 root system 1371 6月03 14时01 rc.db2pe.ee
-rwxr-xr-x 1 root system 235 6月03 13时49 startcm.sh
-rwxr-xr-x 1 root system 185 6月03 13时49 stopcm.sh
注意:在两个节点要保证hosts 和 启动/停止脚本要一样存在。
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 [cmha]
New Nodes (via selected communication paths)[m [AUDB1_boot1 AUDB2_boot1]
Currently Configured Node(s)
这一部很重要,一般我们都是把每个节点的boot1 作为communication path . New node
可以一起加,也可以一个一个的加。当回车以后,系统会自己discover hacmp 的资源
显示如下:
。。。。。。。。。。。。。。。。。。。。
IP Network Discovery completed normally
Current cluster configuration:
Cluster Description of Cluster: cmha
Cluster Security Level: Standard
There are 2 node(s) and 2 network(s) defined
NODE AUDB1:
Network net_ether_01
AUDB2_svc 10.60.1.25
AUDB1_svc 10.60.1.21
AUDB1_boot1 100.1.0.3
AUDB1_boot2 192.168.0.3
Network net_rs232_01
db1_tty0 /dev/tty0
NODE AUDB2:
Network net_ether_01
AUDB2_svc 10.60.1.25
AUDB1_svc 10.60.1.21
AUDB2_boot1 100.1.0.4
AUDB2_boot2 192.168.0.4
Network net_rs232_01
db2_tty0 /dev/tty0
Resource Group res1
Behavior cascading
Participating Nodes AUDB1 AUDB2
Service IP Label AUDB1_svc
添加服务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 AUDB1_svc
* New IP Label/Address [] +
* Network Name [net_ether_01] +
添加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
New Server Name [app1]
Start Script [/ha51/startcm.sh]
Stop Script [/ha51/stopcm.sh]
一个结点上创建hacmvg ,lv, jfs . 然后再import 到另一个节点上。
这里有一个tips , 如果在这里创建共享jfs 遇到问题,可以先手工把vg
在一个结点上varyon , 然后再创建就可以了。
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
Add a Resource Group
Change/Show a Resource Group
Remove a Resource Group
Change/Show Resources for a Resource Group (standard)
Cascading
Rotating Concurrent Custom
[输入字段]
* Resource Group Name res1
New Resource Group Name []
Resource Group Management Policy cascading
* Participating Node Names (Default Node Priority) [AUDB1 AUDB2]
Change/Show Resources for a Resource Group (standard)
[输入字段]
Resource Group Name res1
Participating Node Names (Default Node Priority) AUDB1 AUDB2
* Service IP Labels/Addresses [AUDB1_svc] +
Volume Groups [hacmvg] +
Filesystems (empty is ALL for VGs specified)[/fscm8db /fscm8dblbos /fscm8dbubos /home/> +
Application Servers [app1] +
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
现在就可以做Initialization and Standard Configuration 〉〉 Verify and Synchronize HACMP Configuration .
然后start 一下hacmp ,看看take over 是否都正常
3. 到此为止我们的hacmp已经基本配置完成了。剩下的要在Extended Configuration中配置了。
在Extended Configuration中我们还可以配置 tty 心跳 网络 , hdisk 心跳网络,Persistent Node IP ,application monitor 等等
一个永久的IP标识(persistent IP label)是一个IP别名,它可以被分配给一个群集网络中的指定的节点,并且会一直固定在分配的节点上。
Change/Show a Persistent Node IP Label/Address
在输入字段中输入或选择值。
当完成所有希望的更改之后,按 Enter 键。
AUDB1的永久ip配置
[输入字段]
* Node Name AUDB1
* Node IP Label/Address AUDB1_per
New Node IP Label/Address [] +
* Network Name [net_ether_01] +
AUDB2的永久ip配置
Change/Show a Persistent Node IP Label/Address
在输入字段中输入或选择值。
当完成所有希望的更改之后,按 Enter 键。
[输入字段]
* Node Name AUDB2
* Node IP Label/Address AUDB2_per
New Node IP Label/Address [] +
* Network Name [net_ether_01] +
注意:永久ip 同步完后, ip 立即绑定到boot1 上。
同步:Extended Configuration〉〉Extended Verification and Synchronization
启动hacmp .
这样,我们的hacmp已经配置完成,我们可以监控一下系统的配置情况
AUDB1/#ifconfig -a
en0: 标志=5e080863,c0
inet 100.1.0.3 netmask 0xffffff00 broadcast 100.1.0.255
tcp_sendspace 131072 tcp_recvspace 65536
en3: 标志=5e080863,c0
inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
inet 10.60.1.21 netmask 0xffffff00 broadcast 10.60.1.255
inet 10.60.1.22 netmask 0xffffff00 broadcast 10.60.1.255
tcp_sendspace 131072 tcp_recvspace 65536
lo0: 标志=e08084b
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 65536 tcp_recvspace 65536
卷组使用情况
AUDB1/#lspv
hdisk0 0051e97e81c5ad33 rootvg active
hdisk1 none None
hdisk2 0051e97ed553b0de cmbak
hdisk3 0051e97ed553e40c hacmvg concurrent
文件系统使用情况
/dev/fslv01 -- /home/db2fenc1 jfs2 2097152 rw 否 否
/dev/fslv02 -- /home/db2as jfs2 2097152 rw 否 否
/dev/fslv03 -- /home/db2inst1 jfs2 10223616 rw 否 否
/dev/fslv04 -- /fscm8db jfs2 18612224 rw 否 否
/dev/fslv05 -- /fscm8dbubos jfs2 41156608 rw 否 否
/dev/fslv06 -- /webapp jfs2 102498304 rw 否 否
/dev/fslv07 -- /icmrm jfs2 10485760 rw 否 否
/dev/fslv08 -- /fscm8dblbos jfs2 409731072 rw 否 否
AUDB2/#ifconfig -a
en0: 标志=5e080863,c0
inet 100.1.0.4 netmask 0xffffff00 broadcast 100.1.0.255
inet 10.60.1.26 netmask 0xffffff00 broadcast 10.60.1.255
tcp_sendspace 131072 tcp_recvspace 65536
en3: 标志=5e080863,c0
inet 192.168.0.4 netmask 0xffffff00 broadcast 192.168.0.255
tcp_sendspace 131072 tcp_recvspace 65536
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/52450/viewspace-993887/ ,如需转载,请注明出处,否则将追究法律责任。