Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2765477
  • 博文数量: 389
  • 博客积分: 4177
  • 博客等级: 上校
  • 技术积分: 4773
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-16 23:29
文章分类

全部博文(389)

分类: Oracle

2013-07-31 18:16:59

 
ORACLE RAC 11.2的添加节点

1,停止应用程序,做好当前系统备份.实际上不停也可以,尽量申请到停机时间来增加新的节点,crs和rac数据库不需要停止,而且所以的节点都要启动.
比如集群原来有两个节点,不能关闭一个节点,然后再增加一个新的节点.

2,连接共享存储,需要注意ASM下是采用asmlib,udev或是rawdevice的方式,保持新的节点和原来的节点一致.

3,内核参数,limits.conf,用户相等性,ntp同步,目录变量,uid和gid 都要相等,软件包安装一致;


4,新节点(2),原来的节点(1).
在原来的点上检查一下配置,以grid用户执行
cluvfy stage -post hwos -n r2 -verbose
cluvfy stage -pre crsinst -n r2 -verbose

cluvfy comp peer -refnode r1 -n r2 -verbose  --参考当前的节点来进行检测.
对mismatched的要注意

cluvfy stage -pre nodeadd -n r2 -verbose   增加节点检查

5,在原来的节点的$GRID_HOME/out/bin(oracle 12C是在$GRID_HOME/addnode)下执行addNode.sh,增加CRS到新节点上去

addNode.sh "CLUSTER_NEW_NODES={r2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={r2-vip}"

接下来就是等待,根据服务器的性能和网络状况时间有所不同.


6,执行完毕后,再次在r1上检查nodeadd情况

cluvfy stage -post nodeadd -n r2 -verbose

[grid@r1 ~]$ olsnodes
r1
r2
[grid@r1 ~]$ crsctl check cluster -all
**************************************************************
r1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
r2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

7,扩展oracle rac database到新节点r2上,在原来的节点的$ORACLE_HOME/out/bin(oracle 12C是在$ORACLE_HOME/addnode)下执行addNode.sh

[oracle@r1 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={r2}"   --new X window,longer time than add cluster node


8,执行完毕后,在新节点上增加一个新的实例用到集群数据库中

srvctl add instance -d tt -i tt2 -n r2   - add instance to new node

[oracle@r2 ~]$ srvctl config database -d tt | grep instance  --confirm add instnace sucessfully
Database instances: tt1,tt2


9,记得在原来的节点上为新节点指定instance_number

SQL> alter system set instance_number=2 sid='tt2' scope=spfile;

System altered.

10,启动新节点上的实例


[oracle@r2 ~]$ srvctl start instance -d tt -i tt2

 


11,确认一下实例增加成功


[oracle@r1 bin]$ srvctl status database -d tt
Instance tt1 is running on node r1
Instance tt2 is running on node r2


可以看出来RAC增加新节点还是比较简单,整个过程so easy!

 

阅读(11496) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~