ITPub博客

首页 > 数据库 > Oracle > 11g RAC 增加节点

11g RAC 增加节点

原创 Oracle 作者:yingyifeng306 时间:2014-02-13 09:25:26 0 删除 编辑
11g RAC增减节点过程,参考官方文档 Real Application Clusters Administration and Deployment Guide
前期环境确认,包括主机资源,内存资源等等
用户创建,组创建,创建基于已经搭建好的集群
ssh互信等等,前期准备工作就不详细叙述

确认资源配置正常(预检)
Verify the hardware and operating system installations with the Cluster Verification Utility (CVU).
After you configure the hardware and operating systems on the nodes you want to add, you can run the following commands to verify that the nodes you want to add are reachable by other nodes in the cluster.
[grid@s2-11g ~]$ cluvfy stage -post hwos -n s1-11g  -verbose
Performing post-checks for hardware and operating system setup 
对于预检的输出内容进行确认
预检报错:

Checking shared storage accessibility...

WARNING: 
s1-11g:PRVF-7017 : Package cvuqdisk not installed
        s1-11g
No shared storage found
Shared storage check failed on nodes "s1-11g"

在一节点上安装cvuqdisk-1.0.9-1.rpm 

[root@s1-11g rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm 
Preparing...                ########################################### [100%]
   1:cvuqdisk               ########################################### [100%]

重新预检,预检通过

1.开始添加节点grid:
1.1
Ensure that you have successfully installed Oracle Clusterware on at least one node in your cluster environment. To perform the following procedure, Grid_home must identify your successfully installed Oracle Clusterware home.

1.2
确认节点信息:
 cluvfy stage -pre nodeadd -n s1-11g [-fixup [-fixupdir fixup_dir]] [-verbose]

1.3 To extend the Grid Infrastructure home to the node3, navigate to the Grid_home/oui/bin directory on node1 and run the addNode.sh script using the following syntax, where node3 is the name of the node that you are adding and node3-vip is the VIP name for the node:

1.4添加节点:
If you are using Grid Naming Service (GNS), run the following command:

$ ./addNode.sh "CLUSTER_NEW_NODES={node3}"
If you are not using GNS, run the following command:

$ /oracle/grid/oui/bin/addNode.sh "CLUSTER_NEW_NODES={s1-11g}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={s1-11g-vip}"
[grid@s2-11g ~]$ /oracle/grid/oui/bin/addNode.sh "CLUSTER_NEW_NODES={s1-11g}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={s1-11g-vip}"
如果预检有报错的话将不会继续,需要修复该错误,本次预检报错:
PRVG-11050 : No matching interfaces。。。。。
检查发现OCR中有网卡eth3的信息:
[grid@s2-11g ~]$ oifcfg getif
eth0  172.16.0.0  global  public
eth2  10.10.0.0  global  cluster_interconnect
eth3  20.20.0.0  global  cluster_interconnect
[grid@s2-11g ~]$ oifcfg delif eth3

[grid@s2-11g ~]$ oifcfg delif -global eth3
[grid@s2-11g ~]$ oifcfg getif
eth0  172.16.0.0  global  public
eth2  10.10.0.0  global  cluster_interconnect

预检通过,正常
开始拷贝介质:
Copying to remote nodes (Wednesday, July 10, 2013 9:10:30 AM CST)
......................................................WARNING:Error while copying directory /oracle/grid with exclude file list '/tmp/OraInstall2013-07-10_09-10-13AM/installExcludeFile.lst' to nodes 's1-11g'. [PRKC-PRCF-2015 : One or more commands were not executed successfully on one or more nodes : ]
----------------------------------------------------------------------------------
s1-11g:
    PRCF-2023 : The following contents are not transferred as they are non-readable. 
Directories:
   1) /oracle/grid/gpnp.bak- 
Files:
      
----------------------------------------------------------------------------------


Refer to '/oracle/oraInventory/logs/addNodeActions2013-07-10_09-10-13AM.log' for details. You may fix the errors on the required remote nodes. Refer to the install guide for error recovery.
           55% Done.
Home copied to new nodes

报错:
检查'/tmp/OraInstall2013-07-10_09-10-13AM/installExcludeFile.lst 文件,不存在

不过从报错信息上看,应该是/oracle/grid/gpnp.bak 文件夹的权限有问题:
[root@s2-11g grid]# ls -rtl gpnp.bak/
total 20
drwxr-x--T 6 root root 4096 Apr 27 14:02 wallets
drwxr-x--- 4 root root 4096 Apr 27 14:02 s2-11g
drwxr-x--- 3 root root 4096 Apr 27 14:02 profiles
-rw-r----- 1 root root  167 Apr 27 14:02 manifest.txt
drwxr-x--- 2 root root 4096 Apr 27 14:02 init

文件夹确实存在问题,从文件夹看,是一个备份的文件,可以移除或者对权限进行修改

移除后,删除一节点已经拷贝软件,再次add
其实在add node的过程中,权限是个比较麻烦的东西,特别是里面放置了一些通过root用户创建的文件等
参见文档:
addNode.sh Fail: PRCF-2023 : The following contents are not transferred as they are non-readable [ID 1526405.1]

拷贝结束:
Instantiating scripts for add node (Wednesday, July 10, 2013 9:20:26 AM CST)
.                                                                 1% Done.
Instantiation of add node scripts complete

Copying to remote nodes (Wednesday, July 10, 2013 9:20:30 AM CST)
...............................................................................................                                 96% Done.
Home copied to new nodes

Saving inventory on nodes (Wednesday, July 10, 2013 9:25:36 AM CST)
.                                                               100% Done.
Save inventory complete
WARNING:
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.
/oracle/grid/root.sh #On nodes s1-11g
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node
    
The Cluster Node Addition of /oracle/grid was successful.
Please check '/tmp/silentInstall.log' for more details.
新加节点运行脚本:
[root@s1-11g ~]# /oracle/grid/root.sh
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /oracle/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node s2-11g, number 2, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

新节点grid软件增加完毕

2.rdbms增加:
If you have an Oracle RAC or Oracle RAC One Node database configured on the cluster and you have a local Oracle home, then do the following to extend the Oracle database home to node3:
Navigate to the Oracle_home/oui/bin directory on node1 and run the addNode.sh script as the user that installed Oracle RAC using the following syntax:
oracle 用户:
[oracle@s2-11g bin]$ /oracle/app/product/11.2.0/db_1/oui/bin/addNode.sh "CLUSTER_NEW_NODES={s1-11g}"
Performing pre-checks for node addition 

Checking node reachability...
Node reachability check passed from node "s2-11g"
Checking user equivalence...
User equivalence check passed for user "oracle"
WARNING: 
Node "s1-11g" already appears to be part of cluster
Pre-check for node addition was successful. 
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 9757 MB    Passed
Oracle Universal Installer, Version 11.2.0.3.0 Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.
Performing tests to see whether nodes s1-11g are available
............................................................... 100% Done.
Instantiating scripts for add node (Wednesday, July 10, 2013 9:46:07 AM CST)
.                                                                 1% Done.
Instantiation of add node scripts complete

Copying to remote nodes (Wednesday, July 10, 2013 9:46:23 AM CST)
...............................................................................................                                 96% Done.
Home copied to new nodes

Saving inventory on nodes (Wednesday, July 10, 2013 9:53:48 AM CST)
.                                                               100% Done.
Save inventory complete
WARNING:
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.
/oracle/app/product/11.2.0/db_1/root.sh #On nodes s1-11g
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node
    
The Cluster Node Addition of /oracle/app/product/11.2.0/db_1 was successful.
Please check '/tmp/silentInstall.log' for more details.
[oracle@s2-11g bin]$ 

至此,rdbms软件添加完毕

3.
实例添加:
实例添加有两种方式,可以是静默的手动添加,也可以通过DBCA调用图形界面添加
手动添加涉及到以下几个步骤:
修改参数文件
添加redo,undo
激活thread
启动实例

dbca添加如下:
在运行正常节点上运行dbca:
图形界面略

 ------------------------------------------------------------------------------------
<版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!>
原博客地址:http://blog.itpub.net/23732248/
原作者:应以峰 (frank-ying)
-------------------------------------------------------------------------------------

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23732248/viewspace-1080563/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 11g RAC 删除节点
请登录后发表评论 登录
全部评论
ITpub论坛高可用版主,擅长研究Oracle 内部原理、新特性、高可用和性能调优等,多年来一直保持着对新事务旺盛的求知欲。热切关注 Oracle 和其它相关技术

注册时间:2011-10-12

  • 博文量
    64
  • 访问量
    1355058