为 10g RAC Cluster 添加
        节点




      by Maclean.liu
            liu.maclean@gmail.com
        www.oracledatabase12g.com
About Me

l Email:liu.maclean@gmail.com
l Blog:www.oracledatabase12g.com
l Oracle Certified Database Administrator Master 10g
and 11g
l Over 6 years experience with Oracle DBA technology
l Over 7 years experience with Linux technology
l Member Independent Oracle Users Group
l Member All China Users Group
l Presents for advanced Oracle topics: RAC,
DataGuard, Performance Tuning and Oracle Internal.
RAC 体系为系统扩容开创了一条新的道路:只需要不断向集群 Cluster 中加入新的服务器就
可以了。这里我们就来介绍一下如何为 10g RAC Cluster 增加节点;实际上这并不复杂,甚
至可以说是很简单的。为现有的 Oracle 10g RAC 添加节点大致包括以下步骤:




  1. 配置新的服务器节点上的硬件及操作系统环境
  2. 向 Cluster 集群中加入该节点
  3. 在新节点上安装 Oracle Database software
  4. 为新的节点配置监听器 LISTENER
  5. 通过 DBCA 为新的节点添加实例




我们假设当前 RAC 环境中存在 2 个节点,分别为 vrh1 和 vrh2;该 RAC 环境中 clusterware
和 database 的版本均为 10.2.0.4,需要加入该 Cluster 的新节点为 vrh3。

一、在新的服务器节点上配置操作系统环境

  1. 这包括配置该节点今后使用的 public network 公用网络和 private network 接口,不要忘
    记在 hosts 文件中加入之前节点的网络信息,并将该份完整的 hosts 文件传到集群
    Cluster 中已有的节点上,保证处处可以访问
  2. 同时需要在原有的基础上配置 oracle(或其他 DBA)用户的身份等价性,这需要将新节
    点上生成的 id_rsa.pub 和 id_dsa.pub 文件中的信息追加到 authorized_keys 文件中,并
    保证在所有节点上均有这样一份相同的 authorized_keys 文件
  3. 调整新节点上的操作系统内核参数,保证其满足今后在该节点上运行实例的内存要求
    以及 10g RAC Cluster 的推荐的 udp 网络参数
  4. 调整新节点上的系统时间以保持同其他节点一致,或者配置 NTP 服务
  5. 保证原有 Cluster 中所有节点上的 CRS 都正常运行,否则 addNode 时会报错
  6. 配置 clusterware 和 database 软件的安装目录,要求路径和原有节点上的一致
二.向 Rac Cluster 中加入新的节点
1.在原有 RAC 节点上(vrh1)以 oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并
运行$ORA_CRS_HOME/oui/bin 目录下的 addNode.sh 脚本



[oracle@vrh1 ~]$ export DISPLAY=IP:0.0
[oracle@vrh1 ~]$ cd $ORA_CRS_HOME/oui/bin
[oracle@vrh1 bin]$ ./addNode.sh


2.若 OUI 被正常调用则会出现欢迎界面,并点击 NEXT:
3.在”Specify Cluster Nodes to Add to Installation”界面下输入公共节点名、私有节点名和 VIP
节点名(之前应当在所有节点的/etc/hosts 文件中都配置了):
4.出现”Cluster Node Addition Summary”界面 Review 一遍 Summary 信息,并点击 NEXT:
5.出现”Cluster Node Addition Progress”界面,OUI 成功将安装好的 clusterware 软件传输到新
的节点后,会提示用户运行多个脚本包 括:orainstRoot.sh(新节点)、rootaddnode.sh(运行 OUI
的原有节点)、root.sh(新节点):




6.运行之前提示的三个脚本:
/* 在新节点上运行 orainstRoot.sh 脚本 */

[root@vrh3 ~]# /s01/oraInventory/orainstRoot.sh
Changing permissions of /s01/oraInventory to 770.
Changing groupname of /s01/oraInventory to oinstall.
The execution of the script is complete
/* 在运行 OUI 的原有节点上运行 rootaddnode.sh 脚本 */

[root@vrh1 ~]# /s01/oracle/product/10.2.0/crs/install/rootaddnode.sh
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Attempting to add 1 new nodes to the configuration
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node {nodenumber}: {nodename} {private interconnect name} {hostname}
node 3: vrh3 vrh3-priv vrh3
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
/s01/oracle/product/10.2.0/crs/bin/srvctl add nodeapps -n vrh3 -A vrh3-
vip/255.255.255.0/eth0 -o /s01/oracle/product/10.2.0/crs

/* 在新节点上运行 root.sh 脚本 */

[root@vrh3 ~]# /s01/oracle/product/10.2.0/crs/root.sh
WARNING: directory '/s01/oracle/product/10.2.0' is not owned by root
WARNING: directory '/s01/oracle/product' is not owned by root
WARNING: directory '/s01/oracle' is not owned by root
WARNING: directory '/s01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
OCR LOCATIONS = /dev/raw/raw1
OCR backup directory '/s01/oracle/product/10.2.0/crs/cdata/crs' does not exist.
Creating now
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/s01/oracle/product/10.2.0' is not owned by root
WARNING: directory '/s01/oracle/product' is not owned by root
WARNING: directory '/s01/oracle' is not owned by root
WARNING: directory '/s01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node {nodenumber}: {nodename} {private interconnect name} {hostname}
node 1: vrh1 vrh1-priv vrh1
node 2: vrh2 vrh2-priv vrh2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
    vrh1
    vrh2
    vrh3
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps

Creating VIP application resource on (0) nodes.
Creating GSD application resource on (2) nodes...
Creating ONS application resource on (2) nodes...
Starting VIP application resource on (2) nodes...
Starting GSD application resource on (2) nodes...
Starting ONS application resource on (2) nodes...
Done.


7.运行完成以上脚本后回到 OUI 界面点选 OK,出现安装成功界面:




三.在新节点上安装 Oracle Database software
1.在原有 RAC 节点上以 Oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并运行
$ORACLE_HOME/oui/bin 目录下的 addNode.sh 脚本:
[oracle@vrh1 ~]$ export DISPLAY=IP:0.0

[oracle@vrh1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@vrh1 bin]$ ./addNode.sh
2.若 OUI 被正常调用则会出现欢迎界面,并点击 NEXT:
3.在”Specify Cluster Nodes to Add to Installation“界面中勾选需要安装 Oracle Database software
数据库软件的节点,这里为 vrh3:
4.出现”Cluster Node Addition Summary”界面,review 一遍安装 Summary 后点击 Next:
5.出现”Cluster Node Addition Progress”进度条界面,完成对 Oracle database Software 的远程传
输安装后会提示用户运行 root.sh 脚本:




6.在新的节点(这里为 vrh3)上运行提示脚本 root.sh


四.在新的节点(vrh3)上使用 netca 工具配置监听器 LISTENER,不做展开
五.使用 DBCA 工具在新节点上添加实例
1.在原有 RAC 节点上以 Oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并运行
DBCA 命令:

2.出现 DBCA 欢迎界面,选择”Oracle Real Application Clusters”并点击 Next:
3.勾选节点管理,并点击 Next:
4.勾选”Add an instance”增加节点,并点击 Next:
5.勾选想要添加实例的数据库并填写 SYSDBA 用户信息密码:
6.勾选正确的实例名和节点,并点击 Next

7.Review Storage 存储信息,并点击 Next

8.Review Summary 信息,并点击 OK

9.等待进度条完成,当被提示是否执行另一操作”perform another operation”时选择 No

10.进一步通过查询 gv$instance 视图验证节点是否添加成功,若添加成功则当可以看到所有
的节点信息。




© 2011, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,
否则追求法律责任.

为10g rac cluster添加节点

  • 1.
    为 10g RACCluster 添加 节点 by Maclean.liu liu.maclean@gmail.com www.oracledatabase12g.com
  • 2.
    About Me l Email:liu.maclean@gmail.com lBlog:www.oracledatabase12g.com l Oracle Certified Database Administrator Master 10g and 11g l Over 6 years experience with Oracle DBA technology l Over 7 years experience with Linux technology l Member Independent Oracle Users Group l Member All China Users Group l Presents for advanced Oracle topics: RAC, DataGuard, Performance Tuning and Oracle Internal.
  • 3.
    RAC 体系为系统扩容开创了一条新的道路:只需要不断向集群 Cluster中加入新的服务器就 可以了。这里我们就来介绍一下如何为 10g RAC Cluster 增加节点;实际上这并不复杂,甚 至可以说是很简单的。为现有的 Oracle 10g RAC 添加节点大致包括以下步骤: 1. 配置新的服务器节点上的硬件及操作系统环境 2. 向 Cluster 集群中加入该节点 3. 在新节点上安装 Oracle Database software 4. 为新的节点配置监听器 LISTENER 5. 通过 DBCA 为新的节点添加实例 我们假设当前 RAC 环境中存在 2 个节点,分别为 vrh1 和 vrh2;该 RAC 环境中 clusterware 和 database 的版本均为 10.2.0.4,需要加入该 Cluster 的新节点为 vrh3。 一、在新的服务器节点上配置操作系统环境 1. 这包括配置该节点今后使用的 public network 公用网络和 private network 接口,不要忘 记在 hosts 文件中加入之前节点的网络信息,并将该份完整的 hosts 文件传到集群 Cluster 中已有的节点上,保证处处可以访问 2. 同时需要在原有的基础上配置 oracle(或其他 DBA)用户的身份等价性,这需要将新节 点上生成的 id_rsa.pub 和 id_dsa.pub 文件中的信息追加到 authorized_keys 文件中,并 保证在所有节点上均有这样一份相同的 authorized_keys 文件 3. 调整新节点上的操作系统内核参数,保证其满足今后在该节点上运行实例的内存要求 以及 10g RAC Cluster 的推荐的 udp 网络参数 4. 调整新节点上的系统时间以保持同其他节点一致,或者配置 NTP 服务 5. 保证原有 Cluster 中所有节点上的 CRS 都正常运行,否则 addNode 时会报错 6. 配置 clusterware 和 database 软件的安装目录,要求路径和原有节点上的一致
  • 4.
    二.向 Rac Cluster中加入新的节点 1.在原有 RAC 节点上(vrh1)以 oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并 运行$ORA_CRS_HOME/oui/bin 目录下的 addNode.sh 脚本 [oracle@vrh1 ~]$ export DISPLAY=IP:0.0 [oracle@vrh1 ~]$ cd $ORA_CRS_HOME/oui/bin [oracle@vrh1 bin]$ ./addNode.sh 2.若 OUI 被正常调用则会出现欢迎界面,并点击 NEXT:
  • 5.
    3.在”Specify Cluster Nodesto Add to Installation”界面下输入公共节点名、私有节点名和 VIP 节点名(之前应当在所有节点的/etc/hosts 文件中都配置了):
  • 6.
    4.出现”Cluster Node AdditionSummary”界面 Review 一遍 Summary 信息,并点击 NEXT:
  • 7.
    5.出现”Cluster Node AdditionProgress”界面,OUI 成功将安装好的 clusterware 软件传输到新 的节点后,会提示用户运行多个脚本包 括:orainstRoot.sh(新节点)、rootaddnode.sh(运行 OUI 的原有节点)、root.sh(新节点): 6.运行之前提示的三个脚本: /* 在新节点上运行 orainstRoot.sh 脚本 */ [root@vrh3 ~]# /s01/oraInventory/orainstRoot.sh Changing permissions of /s01/oraInventory to 770. Changing groupname of /s01/oraInventory to oinstall. The execution of the script is complete
  • 8.
    /* 在运行 OUI的原有节点上运行 rootaddnode.sh 脚本 */ [root@vrh1 ~]# /s01/oracle/product/10.2.0/crs/install/rootaddnode.sh clscfg: EXISTING configuration version 3 detected. clscfg: version 3 is 10G Release 2. Attempting to add 1 new nodes to the configuration Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node {nodenumber}: {nodename} {private interconnect name} {hostname} node 3: vrh3 vrh3-priv vrh3 Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. /s01/oracle/product/10.2.0/crs/bin/srvctl add nodeapps -n vrh3 -A vrh3- vip/255.255.255.0/eth0 -o /s01/oracle/product/10.2.0/crs /* 在新节点上运行 root.sh 脚本 */ [root@vrh3 ~]# /s01/oracle/product/10.2.0/crs/root.sh WARNING: directory '/s01/oracle/product/10.2.0' is not owned by root WARNING: directory '/s01/oracle/product' is not owned by root WARNING: directory '/s01/oracle' is not owned by root WARNING: directory '/s01' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now. OCR LOCATIONS = /dev/raw/raw1 OCR backup directory '/s01/oracle/product/10.2.0/crs/cdata/crs' does not exist. Creating now Setting the permissions on OCR backup directory Setting up NS directories Oracle Cluster Registry configuration upgraded successfully WARNING: directory '/s01/oracle/product/10.2.0' is not owned by root WARNING: directory '/s01/oracle/product' is not owned by root WARNING: directory '/s01/oracle' is not owned by root WARNING: directory '/s01' is not owned by root clscfg: EXISTING configuration version 3 detected. clscfg: version 3 is 10G Release 2. Successfully accumulated necessary OCR keys. Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node {nodenumber}: {nodename} {private interconnect name} {hostname} node 1: vrh1 vrh1-priv vrh1 node 2: vrh2 vrh2-priv vrh2 clscfg: Arguments check out successfully. NO KEYS WERE WRITTEN. Supply -force parameter to override. -force is destructive and will destroy any previous cluster configuration. Oracle Cluster Registry for cluster has already been initialized Startup will be queued to init within 30 seconds. Adding daemons to inittab Expecting the CRS daemons to be up within 600 seconds. CSS is active on these nodes. vrh1 vrh2 vrh3 CSS is active on all nodes. Waiting for the Oracle CRSD and EVMD to start Oracle CRS stack installed and running under init(1M) Running vipca(silent) for configuring nodeapps Creating VIP application resource on (0) nodes. Creating GSD application resource on (2) nodes... Creating ONS application resource on (2) nodes...
  • 9.
    Starting VIP applicationresource on (2) nodes... Starting GSD application resource on (2) nodes... Starting ONS application resource on (2) nodes... Done. 7.运行完成以上脚本后回到 OUI 界面点选 OK,出现安装成功界面: 三.在新节点上安装 Oracle Database software 1.在原有 RAC 节点上以 Oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并运行 $ORACLE_HOME/oui/bin 目录下的 addNode.sh 脚本: [oracle@vrh1 ~]$ export DISPLAY=IP:0.0 [oracle@vrh1 ~]$ cd $ORACLE_HOME/oui/bin [oracle@vrh1 bin]$ ./addNode.sh
  • 10.
  • 11.
    3.在”Specify Cluster Nodesto Add to Installation“界面中勾选需要安装 Oracle Database software 数据库软件的节点,这里为 vrh3:
  • 12.
    4.出现”Cluster Node AdditionSummary”界面,review 一遍安装 Summary 后点击 Next:
  • 13.
    5.出现”Cluster Node AdditionProgress”进度条界面,完成对 Oracle database Software 的远程传 输安装后会提示用户运行 root.sh 脚本: 6.在新的节点(这里为 vrh3)上运行提示脚本 root.sh 四.在新的节点(vrh3)上使用 netca 工具配置监听器 LISTENER,不做展开
  • 14.
    五.使用 DBCA 工具在新节点上添加实例 1.在原有RAC 节点上以 Oracle 用户身份登录,设置合理的 DISPLAY 显示环境变量,并运行 DBCA 命令: 2.出现 DBCA 欢迎界面,选择”Oracle Real Application Clusters”并点击 Next:
  • 15.
  • 16.
  • 17.
  • 18.
    6.勾选正确的实例名和节点,并点击 Next 7.Review Storage存储信息,并点击 Next 8.Review Summary 信息,并点击 OK 9.等待进度条完成,当被提示是否执行另一操作”perform another operation”时选择 No 10.进一步通过查询 gv$instance 视图验证节点是否添加成功,若添加成功则当可以看到所有 的节点信息。 © 2011, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址, 否则追求法律责任.