环境:RHEL 6.5 + Oracle 11.2.0.4 单节点RAC
需求:单节点RAC添加新节点
1.添加节点前的准备工作
2.正式添加节点
3.其他配置工作
1.添加节点前的准备工作
参考Oracle官方文档:
Oracle® Clusterware Administration and Deployment Guide
11g Release 2 (11.2) -> Adding and Deleting Cluster Nodes
1.1 确保硬件连接正常
1.1 Make physical connections.
Connect the nodes' hardware to the network infrastructure of your cluster. This includes establishing electrical connections, configuring network interconnects, configuring shared disk subsystem connections, and so on. See your hardware vendor documentation for details about this step.
确保物理层面的硬件连接都正常,这包括public/private网络连接、共享存储的连接。
#public ip
192.168.1.61 jystdrac1
192.168.1.63 jystdrac2
#virtual ip
192.168.1.62 jystdrac1-vip
192.168.1.64 jystdrac2-vip
#scan ip
192.168.1.65 jystdrac-scan
#private ip
10.10.10.61 jystdrac1-priv
10.10.10.63 jystdrac2-priv
我这里实验是jystdrac1是单节点RAC,现在需要添加jystdrac2到集群。
1.2 安装操作系统
1.2 Install the operating system.
Install a cloned image of the operating system that matches the operating system on the other nodes in your cluster. This includes installing required service patches, updates, and drivers. See your operating system vendor documentation for details about this process.
Oracle recommends that you use a cloned image. However, if the installation fulfills the installation requirements, then install the operating system according to the vendor documentation.
安装操作系统,这里Oracle建议使用克隆,基本原则就是与其他节点一致,包括操作系统版本号、Oracle需要的补丁包、操作系统的内核参数等。
1.3 创建Oracle相关用户
1.3 Create Oracle users.
You must create all Oracle users on the new node that exist on the existing nodes. For example, if you are adding a node to a cluster that has two nodes, and those two nodes have different owners for the Grid Infrastructure home and the Oracle home, then you must create those owners onthe new node, even if you do not plan to install an Oracle home on the new node.
As root, create the Oracle users and groups using the same user ID and group ID as on the existing nodes.
使用root用户创建Oracle相关用户,如果其他节点用到grid用户和oracle用户,新加节点也要创建好这些用户,并且保证用户的uid和gid一致。
1.4 确认SSH配置
1.4 Ensure that SSH is configured on the node.
SSH is configured when you install Oracle Clusterware 11g release 2 (11.2). If SSH is not configured, then see Oracle Grid Infrastructure Installation Guide for information about configuring SSH.
如SSH用户等价性需要手工配置,可参考:
•记录一则Linux SSH的互信配置过程
1.5 使用CVU校验
1.5 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 command to verify that the nodes you want to add are reachable by other nodes in the cluster. You can also use this command to verify user equivalence to all given nodes from the local node, node connectivity among all of the given nodes, accessibility to shared storage from all of the given nodes, and so on.
From the Grid_home/bin directory on an existing node, run the CVU command to obtain a detailed comparison of the properties of the reference node with all of the other nodes that are part of your current cluster environment. Replace ref_node with the name of a node in your existing cluster against which you want CVU to compare the nodes to be added. Specify a comma-delimited list of nodes after the -n option. In the following example, orainventory_group is the name of the Oracle Inventory group, and osdba_group is the name of the OSDBA group:
$ cluvfy comp peer [-refnode ref_node] -n node_list [-orainv orainventory_group] [-osdba osdba_group] [-verbose]
For the reference node, select a cluster node against which you want CVU to compare, for example, the nodes that you want to add that you specify with the -n option.
检查新加节点有哪些设置不匹配:
# su - grid
$ cluvfy comp peer -refnode jystdrac1 -n jystdrac2 -verbose
我的环境没有问题。
2.正式添加节点
2.1 确认环境
2.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.
确认在你的集群环境中至少有一个节点成功安装了Oracle Clusterware。下面步骤中的GRID_HOME指的是安装Oracle Clusterware的目录。
2.2 验证添加节点