免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5547 | 回复: 9
打印 上一主题 下一主题

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-01-19 11:14 |只看该作者 |倒序浏览
系统环境:AIX V5.2 , DB2 UDB V8.1 ESE
群集软件:HACMP V5.1
安装步骤:
1、        安装操作系统,补丁升级为ML04
补丁下载地址
ftp:// ftp.software.ibm.com/aix/fixes/52/ml
2、安装HACMP V5.1
HACMP 安装配置完成后,有网卡丢包现象,下载补丁IY53044
http://www-1.ibm.com/support/docview.wss?uid=isg1IY53044
2.1 HACMP 规划
两台主机的IP 规划如下表:
Adapter IP Label        Nodedb_srv        Nodedb_boot        Nodedb_sty        Nodedb_tty
Network Type        ether        ether        ether        rs232
Network Name        Net_ether        Net_ether        Net_ether        Net_rs232
Network Attribute        public        public        Public        serial
Adapter Function        service        boot        standby       
Adapter Identifer        192.168.168.32        192.168.168.28        172.16.1.2        /dev/tty0
Node Name        nodedb        nodedb        nodedb        nodedb

Adapter IP Label        Nodeapp_srv        Nodeapp_boot        Nodeapp_sty        Nodeapp_tty
Network Type        ether        ether        ether        rs232
Network Name        Net_ether        Net_ether        Net_ether        Net_rs232
Network Attribute        public        public        Public        serial
Adapter Function        service        boot        standby       
Adapter Identifer        192.168.168.33        192.168.168.21        172.16.1.1        /dev/tty0
Node Name        Nodeapp        nodeapp        nodeapp        nodeapp

两台主机都安装db2 与websphere, 互为主备,
2.2 Nodedb与nodeapp文件
2.2.1 nodedb   /etc/hosts file
127.0.0.1            loopback localhost nodedb # loopback (lo0) name/address
192.168.168.28   nodedb_boot  nodedb
192.168.168.32   nodedb_srv  
172.16.1.2     nodedb_sty   nodedb
192.168.168.21  nodeapp_boot
192.168.168.33  nodeapp_srv
172.16.1.1       nodeapp_sty
2.2.2 nodedb  /.rhosts file
    nodedb
nodeapp
nodedb_boot
nodedb_srv
nodedb_sty
nodeapp_boot
nodeapp_srv
nodeapp_sty
2.2.3 nodeapp  /etc/hosts file
127.0.0.1            loopback localhost nodeapp  # loopback (lo0) name/address
192.168.168.28   nodedb_boot  nodedb
192.168.168.32   nodedb_srv  
172.16.1.2     nodedb_sty   nodedb
192.168.168.21  nodeapp_boot
192.168.168.33  nodeapp_srv
172.16.1.1       nodeapp_sty
2.2.4 nodeapp  /.rhosts file
H85A
H85B
H85A_svr
H85A_boot
H85A_stb
H85B_svr
H85B_boot
H85B_stb

2.3 HACMP配置
2.3.1 拓扑定义
(1)定义CLUSTER
->;Initialization and Standard Configuration
->;Add Nodes to an HACMP Cluster
Add/Change/Show an HACMP Cluster

[输入字段]
* Cluster Name [ERP]

NOTE: HACMP must be RESTARTED
on all nodes in order for change to take effect

(2)定义nodedb节点
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Nodes
->; Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster

[输入字段]
* Node Name [nodedb]
Communication Path to Node [] +
(2)定义nodeapp节点
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Nodes
->; Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster

[输入字段]
* Node Name [nodedb]
Communication Path to Node [] +

(3) 定义网络
A. 定义IP网络
->; Extended Configuration
->;Extended Topology Configuration
->;Configure HACMP Networks
->; Add a Network to the HACMP Cluster
Add an IP-Based Network to the HACMP Cluster

[输入字段]
* Network Name [net_ether]
* Network Type ether
* Netmask [255.255.255.0] +
* Enable IP Address Takeover via IP Aliases [No] +
IP Address Offset for Heartbeating over IP Aliases []
B. 定义非IP网络
->; Extended Configuration
->;Extended Topology Configuration
->;Configure HACMP Networks
->; Add a Network to the HACMP Cluster
选择# Pre-defined Serial Device Types 中的rs232
Add a Serial Network to the HACMP Cluster
[输入字段]
* Network Name [net_rs232]
* Network Type rs232

(4) 定义网络接口
A. 定义IP网络接口
定义nodedb_boot接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether (0.0.0.0/0)
Add a Communication Interface

[输入字段]
* IP Label/Address [nodedb_boot] +
* Network Type ether
* Network Name net_ether
* Node Name [nodedb] +
Network Interface []

定义Nodedb_sty接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether (0.0.0.0/0)
Add a Communication Interface

[输入字段]
* IP Label/Address [Nodedb_sty] +
* Network Type ether
* Network Name net_ether
* Node Name [nodedb] +
Network Interface []

定义nodeapp_boot接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether (0.0.0.0/0)
Add a Communication Interface

[输入字段]
* IP Label/Address [nodeapp_boot] +
* Network Type ether
* Network Name net_ether
* Node Name [nodeapp] +
Network Interface []

定义nodeapp_sty接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether (0.0.0.0/0)
Add a Communication Interface

[输入字段]
* IP Label/Address [nodeapp_sty] +
* Network Type ether
* Network Name net_ether
* Node Name [nodeapp] +
Network Interface []

B. 定义非IP网络接口
定义nodedb_tty接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232
Add a Communication Device
[输入字段]
* Device Name [Nodedb_sty]
* Network Type rs232
* Network Name net_rs232
* Device Path [/dev/tty0]
* Node Name [nodedb]

定义nodeapp_tty接口:
->; Extended Configuration
->; Extended Topology Configuration
->;Configure HACMP Communication Interfaces/Devices
->; Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232
Add a Communication Device
[输入字段]
* Device Name [nodeapp_tty]
* Network Type rs232
* Network Name net_rs232
* Device Path [/dev/tty0]
* Node Name [nodeapp]

2.3.2 定义应用服务及资源组
定义Was应用服务器:
->;Initialization and Standard Configuration
->;Configure Application Servers
->;Add an Application Server
Add Application Server

[输入字段]
* Server Name [was]
* Start Script [/usr/bin/wasstart]
* Stop Script [/usr/bin/wasstop]

定义共享资源组
定义rgwas资源组
->;Initialization and Standard Configuration
->;Configure HACMP Resource Group
->;Add a Resource Group
选择Cascading
Add a Resource Group with a Cascading Management Policy (standard)

[输入字段]
* Resource Group Name [rgwas]
*Participating Node Names (Default Node Priority) [nodeapp nodedb] +

修改资源组属性
修改rgwas资源组属性:
->;Initialization and Standard Configuration
->;Configure HACMP Resource Group
->; Change/Show Resources for a Cascading Resource Group(standard)
Change/Show Resources for a Cascading Resource Group

[输入字段]
Resource Group Name wlyres
Participating Node Names (Default Node Priority) nodeapp nodedb
* Service IP Labels/Addresses [] +
Volume Groups [wasvg] +
Filesystems (empty is ALL for VGs specified) [] +
Application Servers [was] +

定义Service IP
定义nodedb的service IP地址:
->;Initialization and Standard Configuration
->;Configure Resources to Make Highly Available
->;Configure Service IP Labeles/Addresses
->;Add a service IP Labeles/Addresses
Add a Service IP Label/Address (standard)

[输入字段]
* IP Label/Address [nodeapp_srv] +
* Network Name [net_ether] +

定义db2数据库服务
->;Initialization and Standard Configuration
->;Configure Application Servers
->;Add an Application Server
Add Application Server

[输入字段]
* Server Name [db2]
* Start Script [/usr/bin/hadb2start]
* Stop Script [/usr/bin/hadb2stop]

定义共享资源组
定义rgdb2资源组
->;Initialization and Standard Configuration
->;Configure HACMP Resource Group
->;Add a Resource Group
选择Cascading
Add a Resource Group with a Cascading Management Policy (standard)

[输入字段]
* Resource Group Name [rgdb2]
*Participating Node Names (Default Node Priority) [nodedb nodeapp] +

修改资源组属性
修改rgdb2资源组属性:
->;Initialization and Standard Configuration
->;Configure HACMP Resource Group
->; Change/Show Resources for a Cascading Resource Group(standard)
Change/Show Resources for a Cascading Resource Group

[输入字段]
Resource Group Name rgdb2
Participating Node Names (Default Node Priority) nodedb nodeapp
* Service IP Labels/Addresses [] +
Volume Groups [db2vg] +
Filesystems (empty is ALL for VGs specified) [] +
Application Servers [db2] +

( 定义Service IP
定义nodedb的service IP地址:
->;Initialization and Standard Configuration
->;Configure Resources to Make Highly Available
->;Configure Service IP Labeles/Addresses
->;Add a service IP Labeles/Addresses
Add a Service IP Label/Address (standard)

[输入字段]
* IP Label/Address [nodedb2_srv] +
* Network Name [net_ether] +

2.3.3 同步HACMP配置
->;Initialization and Standard Configuration
->; Verify and Synchronize HACMP Comfiguration
Verify and Synchronize HACMP Comfiguration

[输入字段]
* Verify, Synchronize or Both [Both] +
Force synchronization if verification fails? [No] +
* Verify changes only? [No] +
* Logging [Standard] +

9、 HACMP服务的启动和停止
启动:
#smitty clstart
Start Cluster Services
[输入字段]
* Start now, on system restart or both now +
Start Cluster Services on these nodes [nodedb] +
BROADCAST message at startup? true +
Startup Cluster Lock Services? false +
Startup Cluster Information Daemon? false +
Reacquire resources after forced down ? false +

停止:
#smitty clstop
Stop Cluster Services
[输入字段]
* Stop now, on system restart or both now +
Stop Cluster Services on these nodes [nodedb] +
BROADCAST cluster shutdown? true +
* Shutdown mode graceful+


注:
DB2版本8开始,原来的DB2企业版和企业扩展版合并为企业服务器版,无论对于分区数据库和非分区数据库,在实例目录下都会有db2nodes.cfg文件,该文件记录了服务器节点信息。
在单分区数据库安装模式下,需要建立db2nodes.cfg文件的副本,存放在本地硬盘上,文件名称一致,但内容不同。在HA执行db2启动脚本时将该文件cp到/home/db2inst1/sqlli目录下。
1、在nodedb上创建db2nodes.cfg文件,文件内容为
0 nodedb 0
2、将rc.db2pe.ee文件cp到/usr/bin目录下,并创建db2 脚本hadb2start,内容如下
        #db2start script nodedb
        cp /usr/bin/db2nodes.cfg /home/db2inst1/sqllib/db2nodes.cfg
        rc.db2pe.ee db2inst1 start
db2 停止脚本
# db2 stop script nodedb
rc.db2pe.ee db2inst1 stop
在nodeapp上,也创建db2nodes.cfg文件,文件内容更改为nodeapp就可以了,其他步骤相同。
将脚本加入到ha的db2应用服务器中间就可以了。脚本会自动启动db2相关实例。

论坛徽章:
0
2 [报告]
发表于 2005-01-19 12:26 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

简单吧,哈。。。

论坛徽章:
0
3 [报告]
发表于 2005-01-19 16:16 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

正准备做同样的事情,很有帮助,感谢!

论坛徽章:
0
4 [报告]
发表于 2005-01-19 19:31 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

哈,也是一个喜欢用老方法配ha的!支持!

论坛徽章:
0
5 [报告]
发表于 2005-01-19 22:18 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

辛苦了,谢谢兄弟!

论坛徽章:
0
6 [报告]
发表于 2005-01-19 22:29 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

呵呵~!~多谢了~!~我正要做呢~!~

论坛徽章:
0
7 [报告]
发表于 2005-01-20 08:24 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

我的试验下.谢谢方法.

论坛徽章:
0
8 [报告]
发表于 2005-01-20 09:12 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

好贴,顶

论坛徽章:
0
9 [报告]
发表于 2005-03-28 17:15 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

还没做过,也许以后用得上

论坛徽章:
0
10 [报告]
发表于 2005-03-29 09:18 |只看该作者

刚完成的一个hacmp 5.1 +db2 udb 8.1 ese环境下的HA配置!

修改db2nodes.cfg这个文件也可以在HA启停脚本里用echo 0 nodedb 0
也是可以改的!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP