Add node to RAC – addNode.sh

Env: 11gR2 on OEL 6

Recently i had to add a node to my single node RAC. Below is how i went through.

Confirm that the new server is a replica of the exsitng machine.
ie: the kernel version, the mount points all should match.

1. Run the cluster verify untility and fix all the issues.

cluvfy stage -pre nodeadd -n Node2 -fixup -verbose

2. If the logfiles reside in ORACLE_HOME, then its better to purge them before the activity.

3. Run addNode.sh to copy the Grid Home.
In my env, ‘oracle’ is the owner for both GRID and RDBMS homes. So i ran the command as ‘oracle’ user.

	
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH

/u01/app/11.2.0/grid/oui/bin/addNode.sh -silent CLUSTER_NEW_NODES={Node2} CLUSTER_NEW_VIRTUAL_HOSTNAMES={Node2-vip}

The above might fail for some checks and if they are ignorable set the below and run addNode.sh again.

export IGNORE_PREADDNODE_CHECKS=Y

[oracle@Node1 ~]$ /u01/app/11.2.0/grid/oui/bin/addNode.sh -silent CLUSTER_NEW_NODES={Node2} CLUSTER_NEW_VIRTUAL_HOSTNAMES={Node2-vip}
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2047 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 Node2 are available
............................................................... 100% Done.

.
-----------------------------------------------------------------------------
Cluster Node Addition Summary
Global Settings
   Source: /u01/app/11.2.0/grid
   New Nodes
Space Requirements
   New Nodes
      Node2
         /u01: Required 6.32GB : Available 27.20GB
Installed Products
   Product Names
      Oracle Grid Infrastructure 11.2.0.3.0
      Sun JDK 1.5.0.30.03
      Installer SDK Component 11.2.0.3.0
      Oracle One-Off Patch Installer 11.2.0.1.7
      Oracle Universal Installer 11.2.0.3.0
      Oracle USM Deconfiguration 11.2.0.3.0
      Oracle Configuration Manager Deconfiguration 10.3.1.0.0
      Enterprise Manager Common Core Files 10.2.0.4.4
      Oracle DBCA Deconfiguration 11.2.0.3.0
      Oracle RAC Deconfiguration 11.2.0.3.0
      Oracle Quality of Service Management (Server) 11.2.0.3.0
      Installation Plugin Files 11.2.0.3.0
		: trimmed
      Oracle JDBC/THIN Interfaces 11.2.0.3.0
      Oracle Multimedia Locator 11.2.0.3.0
      Oracle Multimedia 11.2.0.3.0
      HAS Common Files 11.2.0.3.0
      Assistant Common Files 11.2.0.3.0
      PL/SQL 11.2.0.3.0
      HAS Files for DB 11.2.0.3.0
      Oracle Recovery Manager 11.2.0.3.0
      Oracle Database Utilities 11.2.0.3.0
      Oracle Notification Service 11.2.0.3.0
      SQL*Plus 11.2.0.3.0
      Oracle Netca Client 11.2.0.3.0
      Oracle Net 11.2.0.3.0
      Oracle JVM 11.2.0.3.0
      Oracle Internet Directory Client 11.2.0.3.0
      Oracle Net Listener 11.2.0.3.0
      Cluster Ready Services Files 11.2.0.3.0
      Oracle Database 11g 11.2.0.3.0
-----------------------------------------------------------------------------

Instantiating scripts for add node (Tuesday, August 6, 2013 10:07:14 AM UTC)
.                                                                 1% Done.
Instantiation of add node scripts complete

Copying to remote nodes (Tuesday, August 6, 2013 10:07:16 AM UTC)
...............................................................................................                                 96% Done.
Home copied to new nodes

Saving inventory on nodes (Tuesday, August 6, 2013 10:09:14 AM UTC)
.                                                               100% Done.
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 'Node2'.
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 Node2
/u01/app/11.2.0/grid/root.sh #On nodes Node2
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 /u01/app/11.2.0/grid was successful.
Please check '/tmp/silentInstall.log' for more details.
[oracle@Node1 ~]$

************root.sh*****************
Script started on Tue 06 Aug 2013 10:14:59 AM UTC
[root@Node2 ~]# /u01/app/oraInventory/orainstRoot.sh
Creating the Oracle inventory pointer file (/etc/oraInst.loc)
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete.
[root@Node2 ~]#
[root@Node2 ~]#
[root@Node2 ~]#
[root@Node2 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g

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

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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: /u01/app/11.2.0/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 Node1, number 1, 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.
Preparing packages for installation...
ls: /usr/sbin/smartctl: No such file or directory
/usr/sbin/smartctl not found.
error: %pre(cvuqdisk-1.0.9-1.x86_64) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@Node2 ~]#
***********************************

4. Perform post check from Node2:

[oracle@Node2]$ /u01/app/11.2.0/grid/bin/cluvfy stage -post nodeadd -n Node2

5. Perform pre check for database from Node2

[oracle@Node2]$ /u01/app/11.2.0/grid/bin/cluvfy stage -pre dbinst -n Node2 -r 11gR2

6. Perform addNode.sh for RDBMS on 1st node.

/u01/app/oracle/product/11.2.0.3/db_1/oui/bin/addNode.sh -silent CLUSTER_NEW_NODES={Node2}

The above might fail for some checks and if they are ignorable set the below and run addNode.sh again.

export IGNORE_PREADDNODE_CHECKS=Y

[oracle@Node1 ~]$
[oracle@Node1 ~]$ /u01/app/oracle/product/11.2.0.3/db_1/oui/bin/addNode.sh -silent CLUSTER_NEW_NODES={Node2}
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2047 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 Node2 are available
............................................................... 100% Done.

.
-----------------------------------------------------------------------------
Cluster Node Addition Summary
Global Settings
   Source: /u01/app/oracle/product/11.2.0.3/db_1
   New Nodes
Space Requirements
   New Nodes
      Node2
         /u01: Required 4.54GB : Available 24.05GB
Installed Products
   Product Names
      Oracle Database 11g 11.2.0.3.0
      Sun JDK 1.5.0.30.03
      Installer SDK Component 11.2.0.3.0
      Oracle One-Off Patch Installer 11.2.0.1.7
      Oracle Universal Installer 11.2.0.3.0
      Oracle USM Deconfiguration 11.2.0.3.0
      Oracle Configuration Manager Deconfiguration 10.3.1.0.0
      Oracle DBCA Deconfiguration 11.2.0.3.0
		: Trimmed
      Oracle Multimedia 11.2.0.3.0
      Oracle Net 11.2.0.3.0
      Oracle XML Development Kit 11.2.0.3.0
      Database Configuration and Upgrade Assistants 11.2.0.3.0
      Oracle JVM 11.2.0.3.0
      Oracle Advanced Security 11.2.0.3.0
      Oracle Internet Directory Client 11.2.0.3.0
      Oracle Enterprise Manager Console DB 11.2.0.3.0
      HAS Files for DB 11.2.0.3.0
      Oracle Net Listener 11.2.0.3.0
      Oracle Text 11.2.0.3.0
      Oracle Net Services 11.2.0.3.0
      Oracle Database 11g 11.2.0.3.0
      Oracle OLAP 11.2.0.3.0
      Oracle Spatial 11.2.0.3.0
      Oracle Partitioning 11.2.0.3.0
      Enterprise Edition Options 11.2.0.3.0
-----------------------------------------------------------------------------

Instantiating scripts for add node (Tuesday, August 6, 2013 10:39:08 AM UTC)
.                                                                 1% Done.
Instantiation of add node scripts complete

Copying to remote nodes (Tuesday, August 6, 2013 10:39:13 AM UTC)
...............................................................................................                                 96% Done.
Home copied to new nodes

Saving inventory on nodes (Tuesday, August 6, 2013 10:43:58 AM UTC)
.                                                               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.
/u01/app/oracle/product/11.2.0.3/db_1/root.sh #On nodes Node2
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 /u01/app/oracle/product/11.2.0.3/db_1 was successful.
Please check '/tmp/silentInstall.log' for more details.
[oracle@Node1 ~]$ exit
exit

***************
[root@Node2 ~]# /u01/app/oracle/product/11.2.0.3/db_1/root.sh
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0.3/db_1

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.

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.
Finished product-specific root actions.
[root@Node2 ~]# 
*****************

7. Now that you have both Grid and RDBMS on the Node2

8. Modify the spfile and keep it in a shared location.

9. Let the Local_listener be pointed to the individual listeners.

Inst1.local_listener='DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Node1-vip)(PORT=1521))))' 

Inst2.local_listener='DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Node2-vip)(PORT=1521))))' 

*.remote_listener=test-scan

10. Set up the env variables in the Node2

11. Start the instance on Node2

Ref: http://blog.grid-it.nl/index.php/2011/04/13/adding-a-new-node-to-an-oacle-11gr2-cluster/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s