首页 > 数据库 > Oracle > ORACLE 10G增加一个节点rac3
2)配置/etc/hosts 如下:
[root@rac3 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 rac1 localhost.localdomain localhost
127.0.0.1 localhost
#::1 localhost6.localdomain6 localhost6
#public ip
192.168.10.1 rac1
192.168.10.2 rac2
192.168.10.5 rac3
#private ip
10.0.0.1 rac1-priv
10.0.0.2 rac2-priv
10.0.0.3 rac3-priv
#virtual ip
192.168.10.3 rac1-vip
192.168.10.4 rac2-vip
192.168.10.6 rac3-vip
注意:这里不仅新增加的节点中hosts文件需要修改,同一个RAC 环境中所有节点的
hosts 文件都必须重新修改。
2)配置SSH密钥认证
RAC 环境中各节点间不仅时刻保持通讯,而且还有可能互访文件,因此必须要保证各
节点间访问不需输入DBA手动密码即可自动完成,这里我们通过配置SSH 来实现这一点
首先是在新增加的节点时操作,即RAC3 节点(注意执行命令的用户):
[oracle@rac3 .ssh]$ ls
authorized_keys id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts
[oracle@rac3 .ssh]$ rm -rf *
[oracle@rac3 .ssh]$ ll
total 0
[oracle@rac3 ~]$ ssh-keygen -t rsa
[oracle@rac3 ~]$ ssh-keygen -t dsa
然后转至rac1 节点执行,也是以oracle 身份进行操作(执行过程中,当访问远端节点
时可能需要输入目标节点的密码):
[oracle@rac1 ~]$ ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys最后传输rac1 节点中配置好的认证密钥信息到节点2 和节点3,执行命令如下:
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
authorized_keys 100% 2982 2.9KB/s 00:00
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keys
oracle@rac3's password:
authorized_keys 100% 2982 2.9KB/s 00:00
首先是检查安装环境,仍然是使用runcluvfy.sh 脚本来进行验证,该脚本可以在现有RAC
配置中的任意节点上执行,这里在节点rac1 执行,如下:
[oracle@rac1 cluvfy]$ pwd
/u01/app/clusterware/cluvfy
[oracle@rac1 cluvfy]$ ls
cvupack.zip jrepack.zip runcluvfy.sh
2)安装clusterware到新节点
新节点中clusterware 的安装也是从现有的RAC 环境中开始的,在当前RAC 环境中任
意节点的$CRS_HOME,执行oui/bin/addNode.sh 脚本敲出视界界面,操作如下:
在rac1中执行:
[root@rac1 ~]# xhost +
[root@rac1 ~]# su - oracle
[oracle@rac1 bin]$ pwd
/u01/app/oracle/crs/oui/bin
[oracle@rac1 bin]$ ls
addLangs.sh attachHome.sh lsnodes ouica.sh runConfig.sh runInstaller.sh
addNode.sh detachHome.sh ouica.bat resource runInstaller


按照提示,按顺序执行相应脚本,如下:

[root@rac1 ~]# /u01/app/oracle/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
node 3: rac3 rac3-priv rac3
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
/u01/app/oracle/crs/bin/srvctl add nodeapps -n rac3 -A rac3-vip/255.255.255.0/eth0 -o /u01/app/oracle/crs

至此,新节点的CLUSTERWARE 配置完成,要检查安装的结果,可以在新节点中调用cluvfy 命令进行验证,如下:
[oracle@rac3 bin]$ pwd
/u01/app/oracle/crs/bin
[oracle@rac3 bin]$ ./cluvfy stage -post crsinst -n rac3 -verbose
Performing post-checks for cluster services setup
Checking node reachability...
Check: Node reachability from node "rac3"
Destination Node Reachable?
------------------------------------ ------------------------
rac3 yes
Result: Node reachability check passed from node "rac3".
Checking user equivalence...
Check: User equivalence for user "oracle"
Node Name Comment
------------------------------------ ------------------------
rac3 passed
Result: User equivalence check passed for user "oracle".
Checking Cluster manager integrity...
Checking CSS daemon...
Node Name Status
------------------------------------ ------------------------
rac3 running
Result: Daemon status check passed for "CSS daemon".
Cluster manager integrity check passed.
Checking cluster integrity...
Node Name
------------------------------------
rac1
rac2
rac3
Cluster integrity check passed
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
ERROR:
OCR integrity is invalid.
OCR integrity check failed.
Checking CRS integrity...
Checking daemon liveness...
Check: Liveness for "CRS daemon"
Node Name Running
------------------------------------ ------------------------
rac3 yes
Result: Liveness check passed for "CRS daemon".
Checking daemon liveness...
Check: Liveness for "CSS daemon"
Node Name Running
------------------------------------ ------------------------
rac3 yes
Result: Liveness check passed for "CSS daemon".
Checking daemon liveness...
Check: Liveness for "EVM daemon"
Node Name Running
------------------------------------ ------------------------
rac3 yes
Result: Liveness check passed for "EVM daemon".
Liveness of all the daemons
Node Name CRS daemon CSS daemon EVM daemon
------------ ------------------------ ------------------------ ----------
rac3 yes yes yes
Checking CRS health...
Check: Health of CRS
Node Name CRS OK?
------------------------------------ ------------------------
rac3 yes
Result: CRS health check passed.
CRS integrity check passed.
Checking node application existence...
Checking existence of VIP node application
Node Name Required Status Comment
------------ ------------------------ ------------------------ ----------
rac3 yes exists passed
Result: Check passed.
Checking existence of ONS node application
Node Name Required Status Comment
------------ ------------------------ ------------------------ ----------
rac3 no exists passed
Result: Check passed.
Checking existence of GSD node application
Node Name Required Status Comment
------------ ------------------------ ------------------------ ----------
rac3 no exists passed
Result: Check passed.
Post-check for cluster services setup was unsuccessful on all the nodes. #看到此节点,说明添加成功
4.复制oracle软件到新节点rac3
接下来要复制ORACLE 数据库软件到新节点,复制操作可以在现的RAC 环境中的任意节点中开始,这里我们选择在rac12节点上操作:
[oracle@rac2 bin]$ pwd
/u01/app/oracle/db_1/oui/bin
[oracle@rac2 bin]$ ./addNode.sh



在rac2执行netca,选择rac3,添加监听
只选择在节点rac3上创建监听,如下:


在当前正在运行的 数据库上增加实例,如下:
下面显示当前数据库下的两个实例,如下:

选择默认实例,点击下一步,如下:
在此期间,ORACLE 开始自动在新节点上创建实例,并且会视需要提示创建ASM 相关实例(如果使用了ASM 做存储的话,点击yes):

7.验证信息:
[oracle@rac1 ~]$ export ORACLE_SID=orcl1
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sat May 17 22:06:55 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/14288937/viewspace-1264020/ ,如需转载,请注明出处,否则将追究法律责任。