OS:
[root@rac ~]# more /etc/oracle-release
Oracle Linux Server release 5.7
DB:
SQL> SELECT * FROM V$VERSION;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
目前拥有一套两节点RAC:node1为rac,node2为rac1。
准备工作:
1.首先,物理链路的准备。(存储,心跳线互联等)
2.根据前两个节点安装节点三的操作系统,安装依赖的包,配置核心参数,/etc/hosts
3.在node3创建相应的组,用户,目录
4.确保每个节点之间ssh互信
5.验证node1、node2与node3之间的连通性.
操作步骤:
1、配置ssh:
在rac2:
su - oracle
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
在rac和rac1:
su - oracle
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
在rac2:
su - grid
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
在rac和rac1:
su - grid
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
配置完成后在每个节点互信验证
2、在11.2 GI中推出了octssd时间同步服务,使用octssd的话那么建议禁用ntpd事件服务
[root@rac2 ~]#service ntpd stop
[root@rac2 ~]#chkconfig ntpd off
[root@rac2 ~]#mv /etc/ntp.conf /etc/ntp.conf.bak
[root@rac2 ~]#rm /var/run/ntpd.pid
3、验证新添加的节点是否满足cluster要求:
在节点一或节点二运行:
su - grid
cluvfy stage -pre nodeadd -n
[grid@rac ~]$cluvfy stage -pre nodeadd -n rac2
Performing pre-checks for node addition
Checking node reachability...
Node reachability check passed from node "rac"
Checking user equivalence...
User equivalence check passed for user "grid"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Check: Node connectivity for interface "eth0"
Node connectivity passed for interface "eth0"
Node connectivity check passed
Checking CRS integrity...
CRS integrity check passed
Checking shared resources...
Checking CRS home location...
The location "/u01/app/grid" is not shared but is present/creatable on all nodes
Shared resources check for node addition passed
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Check: Node connectivity for interface "eth0"
Node connectivity passed for interface "eth0"
Check: Node connectivity for interface "eth1"
Node connectivity passed for interface "eth1"
Node connectivity check passed
Total memory check passed
Available memory check passed
Swap space check passed
Free disk space check passed for "rac2:/tmp"
Free disk space check passed for "rac:/tmp"
Check for multiple users with UID value 54322 passed
User existence check passed for "grid"
Run level check passed
Hard limits check failed for "maximum open file descriptors"
Check failed on nodes:
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "make-3.81( x86_64)"
Package existence check passed for "binutils-2.17.50.0.6( x86_64)"
Package existence check passed for "gcc-4.1.2 (x86_64)( x86_64)"
Package existence check passed for "libaio-0.3.106 (x86_64)( x86_64)"
Package existence check passed for "glibc-2.5-24 (x86_64)( x86_64)"
Package existence check passed for "compat-libstdc++-33-3.2.3 (x86_64)( x86_64)"
Package existence check passed for "elfutils-libelf-0.125 (x86_64)( x86_64)"
Package existence check passed for "elfutils-libelf-devel-0.125( x86_64)"
Package existence check passed for "glibc-common-2.5( x86_64)"
Package existence check passed for "glibc-devel-2.5 (x86_64)( x86_64)"
Package existence check passed for "glibc-headers-2.5( x86_64)"
Package existence check passed for "gcc-c++-4.1.2 (x86_64)( x86_64)"
Package existence check passed for "libaio-devel-0.3.106 (x86_64)( x86_64)"
Package existence check passed for "libgcc-4.1.2 (x86_64)( x86_64)"
Package existence check passed for "libstdc++-4.1.2 (x86_64)( x86_64)"
Package existence check passed for "libstdc++-devel-4.1.2 (x86_64)( x86_64)"
Package existence check passed for "sysstat-7.0.2( x86_64)"
Package existence check passed for "ksh-20060214( x86_64)"
Check for multiple users with UID value 0 passed
Current group ID check passed
Checking OCR integrity...
OCR integrity check passed
Checking Oracle Cluster Voting Disk configuration...
Oracle Cluster Voting Disk configuration check passed
Time zone consistency check passed
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP Configuration file check started...
No NTP Daemons or Services were found to be running
Clock synchronization check using Network Time Protocol(NTP) passed
User "grid" is not part of "root" group. Check passed
Checking consistency of file "/etc/resolv.conf" across nodes
File "/etc/resolv.conf" does not have both domain and search entries defined
domain entry in file "/etc/resolv.conf" is consistent across nodes
search entry in file "/etc/resolv.conf" is consistent across nodes
All nodes have one search entry defined in file "/etc/resolv.conf"
PRVF-5636 : The DNS response time for an unreachable node exceeded "15000" ms on following nodes: vrh3
File "/etc/resolv.conf" is not consistent across nodes
Pre-check for node addition was unsuccessful on all the nodes.
如果我们不使用DNS解析域名方式的话,那么resolv.conf不一致的问题可以忽略
4、在rac或rac1上进入/u01/app/grid/11.2.0/oui/bin目录下,执行以下命令:
[grid@rac bin]$ export IGNORE_PREADDNODE_CHECKS=Y
[grid@rac bin]$ ./addNode.sh
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.
Oracle Universal Installer, Version 11.2.0.3.0 Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.
Performing tests to see whether nodes rac1,rac2 are available
............................................................... 100% Done.
..
-----------------------------------------------------------------------------
Cluster Node Addition Summary
Global Settings
Space Requirements
Installed Products
-----------------------------------------------------------------------------
Instantiating scripts for add node (Tuesday, August 13, 2013 3:01:07 AM CST)
.
Instantiation of add node scripts complete
Copying to remote nodes (Tuesday, August 13, 2013 3:01:13 AM CST)
...............................................................................................
Home copied to new nodes
Saving inventory on nodes (Tuesday, August 13, 2013 3:05:58 AM CST)
.
Save inventory complete
WARNING:A new inventory has been created on one or more nodes in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script at '/u01/app/oraInventory/orainstRoot.sh' with root privileges on nodes 'rac2'.
If you do not register the inventory, you may not be able to update or patch the products you installed.
The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes.
/u01/app/oraInventory/orainstRoot.sh #On nodes rac2
/u01/app/grid/11.2.0/root.sh #On nodes rac2
To execute the configuration scripts:
The Cluster Node Addition of /u01/app/grid/11.2.0 was successful.
Please check '/tmp/silentInstall.log' for more details.
命令执行完后,根据提示执行脚本(此步骤就不写了),执行完脚本集群节点添加成功,下面开始对新添加的节点安装RAC软件
5、在rac或rac1,以oracle用户进入/u01/app/oracle/11.2.0/db_1/oui/bin,添加软件
[root@rac bin]# su - oracle
[oracle@rac bin]$ export IGNORE_PREADDNODE_CHECKS=Y
[oracle@rac bin]$ ./addNode.sh
在vnc运行的输出结果,直接截图了。
6、在rac或rac1,用oracle用户执行dbca命令,添加实例
[root@rac ~]# xhost +
[root@rac ~]# su - oracle
[oracle@rac ~]$ dbca