Oracle RAC增加一个节点_3个RAC节点的数据库

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:1298

Oracle RAC增加一个节点_3个RAC节点的数据库

1、主机名规划:
#Public Network - (eth0)
192.168.110.11 rac1
192.168.110.12 rac2
192.168.110.13 rac3
#Private Interconnect - (eth1)
10.10.10.11 rac1priv
10.10.10.12 rac2priv
10.10.10.13 rac3priv
#Public Virtual IP (VIP) addresses - (eth0)
192.168.110.21 rac1vip
192.168.110.22 rac2vip
192.168.110.23 rac3vip

2、配置与rac1与rac2一样的OS环境,包括创建用户,环境变量,SSH验证等。

3、Install Oracle Clusterware on the new node
在第一个节点上操作以下:
cd $CRS_HOME/oui/bin
./addNode.sh
根据提示完成第3个节点的crs安装,安装完后成,运行以下脚本:
/oracle/app/oraInventory/orainstRoot.sh rac3
/oracle/app/crs/install/rootaddnode.sh rac1
/oracle/app/crs/root.sh rac3
详细日志如下:
[root@rac3 ~]# /oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /oracle/app/oraInventory to 770.
Changing groupname of /oracle/app/oraInventory to oinstall.
The execution of the script. is complete

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

[root@rac3 ~]# /oracle/app/crs/root.sh
WARNING: directory '/oracle/app' is not owned by root
WARNING: directory '/oracle' 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 '/oracle/app/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 '/oracle/app' is not owned by root
WARNING: directory '/oracle' 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 :
node 1: rac1 rac1priv rac1
node 2: rac2 rac2priv rac2
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.
rac1
rac2
rac3
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
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 (0) nodes.
Creating ONS application resource on (0) nodes.
Starting VIP application resource on (2) nodes...
Starting GSD application resource on (2) nodes...
Starting ONS application resource on (2) nodes...

Done.

4、
[oracle@rac1 ~]$ cat $CRS_HOME/opmn/conf/ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
[oracle@rac1 ~]$ $CRS_HOME/bin/racgons add_config rac3:6200

[oracle@rac3 ~]$ olsnodes
rac1
rac2
rac3

操作后,状态如下:
[oracle@rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application OFFLINE OFFLINE
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application OFFLINE OFFLINE
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
ora.rac3.gsd application ONLINE ONLINE rac3
ora.rac3.ons application ONLINE ONLINE rac3
ora.rac3.vip application ONLINE ONLINE rac3
ora.racdb.db application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
ora....db_s.cs application OFFLINE OFFLINE
ora....db1.srv application OFFLINE OFFLINE
ora....db2.srv application OFFLINE OFFLINE

5、Install Oracle RDBMS and ASM Home on the new node
在第一个节点上操作以下:
cd $ORACLE_HOME/oui/bin
./addNode.sh
完成后,执行:
/oracle/app/product/10.2.0/db_1/root.sh rac3
6、Configure the Listener on the new Node
The following steps need to be done on node3:
$ORACLE_HOME/bin/netca
只选择rac3进行配置

6、Create an ASM Instance on the new node.
The following steps need to be done on node1:
Login as the Oracle user and set the environment to ASM home.
$ORACLE_HOME/bin/dbca
先配ASM,再建INSTANCE
选择instance management-------add instance
创建完成后,状态如下:
[oracle@rac3 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE   rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
ora....SM3.asm application ONLINE ONLINE rac3
ora....C3.lsnr application ONLINE ONLINE rac3
ora.rac3.gsd application ONLINE ONLINE rac3
ora.rac3.ons application ONLINE ONLINE rac3
ora.rac3.vip application ONLINE ONLINE rac3
ora.racdb.db application ONLINE ONLINE rac3
ora....b1.inst application ONLINE ONLINE rac1
ora....b2.inst application ONLINE ONLINE rac2
ora....b3.inst application ONLINE ONLINE rac3
ora....db_s.cs application ONLINE ONLINE rac1
ora....db1.srv application ONLINE ONLINE rac1
ora....db2.srv application ONLINE ONLINE rac2
ora....db3.srv application ONLINE ONLINE rac3

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】