AIX集群修改IP步骤
集群修改IP步骤
环境:
AIX 5L
HACMP 5.2
ORACLE 10g RAC
步骤:
1.?????? 将两个RAC节点的操作系统重启
?
2.?????? 在两个节点上分别编辑/etc/hosts,将boot, standby, service更改成要求的IP地址。
?
3.?????? 在两个节点上分别用‘smit chinet’更改boot和standby网卡的IP为要求的IP,需要和/etc/hosts中的IP对应一致。
?
4.?????? 在两个节点上互相ping对方的bott和standby的IP,确保能ping通。
?
5.?????? 在HACMP配置更改IP
5.1修改节点IP地址
#smit hacmp -> Extended Configuration -> Extended Topology configuration -> configure HACMP Nodes -> Change/Show a Node in the HACMP Cluster -> 选择第一个节点 -> 配置 Communication Path to Node 为其boot地址 ->选择第二个节点 -> 配置Communication Path to Node为其boot地址。
用上述方法在另一台机器上更改节点IP地址。
?
5.2重新刷新节点信息
登陆一个节点
#smit hacmp -> Extended Configuration -> discover HACMP-related information from configured nodes
?
5.3查看并同步更新后的拓扑信息
#smit hacmp -> Extended Configuration ->extended topology configuration -> show HACMP topology
确认信息正确后,同步两个节点信息
#smit hacmp -> Extended Configuration ->extended topology configuration -> extended verification and synchronization -> 按照默认设置同步
?
6.?????? 启动HACMP服务
#smit clstart -> 选择两个节点启动
#/usr/sbin/cluster/utilities/cllsif?????? //查看并确认HA启动后的IP设置;
?
7.?????? 启动CRS
7.1在两个节点依次执行crsctl start crs
?
7.2执行crs_stat –t 查看crs启动情况,直到两个instance均启动。
?
例如:
Name?????????????? Type??????????? Target??????? State???????? Host
_____________________________________________________________
Ora..B1.inst???????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora..B2.inst???????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora..DCDB.db?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….B1.lsnr??????? application??????? ONLINE???? OFFLINE???
Ora….db1.gsd?????? application???? ???ONLINE???? ONLINE??? bocnetdb1
Ora….db1.ons?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….db1.vip?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….B2.lsnr?????? application??????? ONLINE???? OFFLINE???
Ora….db2.gsd?????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora….db2.ons?????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora….db2.vip?????? application??????? ONLINE???? ONLINE??? bocnetdb2
?
8.?????? 查看修改前CRS信息
#oifcfg getif
En2? 10.12.191.0 global cluster_interconnect
En3? 22.12.191.0 blobal public
?
#srvctl config nodeapps –n XXXX(节点名) –a
例如:VIP exists:/bocnetdb1-vip/22.12.191.167/255.255.255.0/en3
?
9.?????? 对照主机IP地址修改listener.ora以及tnsnames.ora中的IP信息
?
10.?? 重新配置CRS IP信息
10.1修改对应网卡的IP信息
在第一个节点执行:
#oifcfg delif -global en2
#oifcfg delif -global en3
?
#oifcfg setif –global en2/10.12.140.0:cluster_interconnect
#oifcfg setif –global en3/21.12.140.0:public
?
10.2在两个节点上分别执行检查
#oifcfg getif
En2 10.12.140.0 global cluster_interconnect
En3 21.12.140.0 global public
?
10.3在第一个节点上停止CRS节点应用
#srvctl stop nodeapps –n bocnetdba1
#srvctl stop nodeapps –n bocnetdba2
?
此时所有CRS配置应均为OFFLINE。
例如
Name?????????????? Type??????????? Target??????? State???????? Host
_____________________________________________________________
Ora..B1.inst???????? application??????? OFFLINE??? OFFLINE
Ora..B2.inst???????? application??????? OFFLINE??? OFFLINE??
Ora..DCDB.db?????? application??????? OFFLINE??? OFFLINE??
Ora….B1.lsnr??????? application?????? OFFLINE??? OFFLINE???
Ora….db1.gsd?????? application??????? OFFLINE??? OFFLINE??
Ora….db1.ons?????? application??????? OFFLINE??? OFFLINE?
Ora….db1.vip?????? application??????? OFFLINE??? OFFLINE??
Ora….B2.lsnr?????? application??????? OFFLINE??? OFFLINE??
Ora….db2.gsd?????? application??????? OFFLINE??? OFFLINE?
Ora….db2.ons?????? application??????? OFFLINE??? OFFLINE??
Ora….db2.vip?????? application??????? OFFLINE??? OFFLINE??
?
10.4修改节点IP信息
在第一节点执行
#srvctl modify nodeapps –n bocnetdb1 –A 10.12.140.193/255.255.255.0/en2
#srvctl modify nodeapps –n bocnetdb1 –A 21.12.140.194/255.255.255.0/en3
?
在第二节点执行
#srvctl modify nodeapps –n bocnetdb2 –A 10.12.140.195/255.255.255.0/en2
#srvctl modify nodeapps –n bocnetdb2 –A 10.12.140.196/255.255.255.0/en2
?
执行检查
#srvctl config nodeapps –n bocnetdb1 –a
#srvctl config nodeapps –n bocnetdb2 –a
?
11.重启CRS
11.1在两个节点分别重启CRS
#crsctl stop crs
#crsctl start crs
?
11.2验证CRS启动信息
#crs_stat –t
Name?????????????? Type??????????? Target??????? State???????? Host
_____________________________________________________________
Ora..B1.inst???????? application?? ?????ONLINE???? ONLINE??? bocnetdb1
Ora..B2.inst???????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora..DCDB.db?????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora….B1.lsnr??????? application??????? ONLINE???? OFFLINE?? bocnetdb1
Ora….db1.gsd?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….db1.ons?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….db1.vip?????? application??????? ONLINE???? ONLINE??? bocnetdb1
Ora….B2.lsnr?????? application??????? ONLINE???? OFFLINE?? ?bocnetdb2
Ora….db2.gsd?????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora….db2.ons?????? application??????? ONLINE???? ONLINE??? bocnetdb2
Ora….db2.vip?????? application??????? ONLINE???? ONLINE??? bocnetdb2
?
#oifcfg getif
12.检查$ORA_CRS_HOME/log/<节点名>/crsd/crsd.log是否有报错信息。