Oracle® Database 2 Day + Real Application Clusters Guide 11g Release 2 (11.2) Part Number E10743-01 |
|
|
View PDF |
This chapter describes how to add and remove nodes and instances in Oracle Real Application Clusters (Oracle RAC) environments. You can use these methods when configuring a new Oracle RAC cluster, or when scaling up an existing Oracle RAC cluster.
This chapter includes the following sections:
Note:
For this chapter, it is very important that you perform each step in the order shown.See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database
Before a node can be added to the cluster, you must perform the same preinstallation steps on the new node as you did for all the existing nodes in the cluster. This includes the following tasks:
Checking hardware compatibility
Configuring the operating system
Configuring SSH connectivity between the new node and the other cluster members
Configuring access to shared storage
Creating groups, users, and directories
Refer to Chapter 2, "Preparing Your Cluster" for details on these tasks.
When adding a node to an existing cluster, the new node must match the configuration of the other nodes in the cluster. This means the new nodes must run the same operating system and version of the operating system as the other nodes. The new machine must also use the same chip architecture (32-bit or 64-bit) as the other nodes. However, you can have machines of different speeds and sizes in the same cluster.
After you have configured the new nodes, you should use cluvfy
to verify that all the requirements for installation have been met. To verify the new node meets the hardware requirement, run the following command on an existing node (for example, either racnode1
or racnode2
) from the Grid_home
/bin
directory:
cluvfy stage -pre crsinst -n racnode3 -verbose
Now that the new node has been configured to support Oracle Clusterware, you use Oracle Universal Installer (OUI) to add a Grid home to the node being added to your Oracle RAC cluster.
This section assumes that you are adding a node named racnode3
and that you have already successfully installed Oracle Clusterware on racnode1
in a nonshared home, where Grid_home
represents the successfully installed Oracle Clusterware home.
To extend the Oracle grid infrastructure to include the new node:
Verify the new node has been properly prepared for an Oracle Clusterware installation by running the following CLUVFY command on the racnode1
node:
cluvfy stage -pre nodeadd -n racnode3 -verbose
As the oracle
user (owner of the Oracle Grid software installation) on racnode1
, go to Grid_home
/oui/bin
and run the addNode.sh
script in silent mode:
cd /u01/grid/oui/bin ./addNode.sh -silent "CLUSTER_NEW_NODES={racnode3}" "CLUSTER_NEW_VIRTUAL_ HOSTNAMES={racnode3-vip}"
When running this command, the curly braces ( { } ) are not optional and must be included or the command will return an error.
You can alternatively use a response file instead of placing all the arguments in the command line. See Oracle Clusterware Administration and Deployment Guide for more information on using response files.
When the script finishes, run the root.sh
script as the root
user on the new node, racnode3
, from the Oracle home directory on that node.
If you are not using Oracle Grid Naming Service (GNS), then you must add the name and address for racnode3
to DNS.
You should now have Oracle Clusterware running on the new node. To verify the installation of Oracle Clusterware on the new node, you can run the following command on the newly configured node, racnode3
:
$ cd /u01/grid/bin $ ./cluvfy stage -post nodeadd -n racnode3 -verbose
Note:
Avoid changing host names after you complete the Oracle Clusterware installation, including adding or deleting domain qualifications. Nodes with changed host names must be deleted from the cluster and added back with the new name.See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database
Now that you have extended the Grid home to the new node, you must extend the Oracle home on racnode1
to racnode3
. The following steps assume that you have already completed the tasks described in the previous sections, "Preparing the New Node" and "Extending the Oracle Grid Infrastructure Home to the New Node", and that racnode3
is a member node of the cluster to which racnode1
belongs.
The procedure for adding an Oracle home to the new node is very similar to the procedure you just completed for extending the Grid home to the new node.
To extend the Oracle RAC installation to include the new node:
Ensure that you have successfully installed the Oracle RAC software on at least one node in your cluster environment. To use these procedures as shown, replace Oracle_home
with the location of your installed Oracle home directory.
Go to the Oracle_home/oui/bin
directory on racnode1
and run the addNode.sh
script in silent mode as shown in the following example:
$ cd /u01/app/oracle/product/11.2.0/oui/bin $ ./addode.sh -silent "CLUSTER_NEW_NODES={racnode3}"
When the script finishes, run the root.sh
script as the root
user on the new node, racnode3
, from the Oracle home directory on that node.
For policy-managed databases with Oracle Managed Files (OMF) enabled, no further actions are needed.
For a policy-managed database, when you add a new node to the cluster, it is placed in the Free pool by default. If you increase the cardinality of the database server pool, then an Oracle RAC instance is added to the new node, racnode3
, and it is moved to the database server pool. No further action is necessary.
Add shared storage for the undo tablespace and redo log files.
If OMF is not enabled for your database, then you must manually add an undo tablespace and redo logs.
If you have an administrator-managed database, then add a new instance on the new node as described in "Creating an Instance on the New Node".
If you followed the installation instructions in this guide, then your cluster database is an administrator-managed database and stores the database files on Oracle Automatic Storage Management (Oracle ASM) with OMF enabled.
After completing these steps, you should have an installed Oracle home on the new node.
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database
If you followed the steps described in "Extending the Oracle RAC Home Directory", the cluster node is added to the cluster by the addNode.sh
script. After the software is started on the new node, it is detected by Enterprise Manager. If an EM agent was not installed on the new node, then an alert is issued for that host, with the message "Incomplete configuration".
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database
You can add an instance to the cluster using either the Instance Management option of Database Configuration Assistant (DBCA) or using Enterprise Manager. Before using either of these options you must first configure the new node to be a part of the cluster and install the software on the new node as described in the previous sections.
There are two methods of adding an instance to the new node:
Note:
The steps described in this section require a license for the Enterprise Manager Provisioning Management pack. Refer to the Oracle Database Licensing Information for information about the availability of these features on your system.To add an instance to a policy-managed databases, you simply increase the cardinality of the server pool for the database. The database instance and ASM instance on the new node are created and configured automatically when a node is added to the server pool.
To add an instance to a policy-managed database using Enterprise Manager:
From the Cluster Database Home page, click Server.
Under the heading Change Database, click Add Instance.
The Add Instance: Cluster Credentials page appears.
Enter the credentials of the Oracle Clusterware software owner and the SYSASM user, then click Next.
After the credentials have been validated, the Edit Server Pool page appears.
Modify the server pool settings then click Submit.
Click the Database tab to return to the Cluster Database Home page.
Review the number of instances available for your cluster database.
When adding an instance to an administrator-managed databases, you must specify the name of the database instance and which node it should run on.
To add an instance to an administrator-managed database using Enterprise Manager:
From the Cluster Database Home page, click Server.
Under the heading Change Database, click Add Instance.
The Add Instance: Cluster Credentials page appears.
Enter the credentials of the Oracle Clusterware software owner and for the SYSASM user, then click Next.
After the credentials have been validated, the Add Instance: Host page appears.
In the Name of the database instance to be added field, either use the default instance name, or enter a different name for the database instance, such as racnode3
.
Select the node on which you want to create the new instance, then Next.
Note:
This procedure assumes that the Oracle Database software is already configured on the selected node and that there is no instance for the cluster database currently running on the selected node.After the selected host has been validated, the Add Instance: Review page appears.
Review the information, then click Submit Job to proceed.
A confirmation page appears.
Click View Job to check on the status of the submitted job.
The Job Run detail page appears.
Click your browser's Refresh button until the job shows a status of Succeeded or Failed.
If the job shows a status of Failed, you can click the name of the step that failed to view the reason for the failure.
Click the Database tab to return to the Cluster Database Home page.
The number of instances available in the cluster database is increased by one.
Sometimes, it might be necessary to remove a database instance from your cluster database. For example, if you want to retire or repurpose a server, you would first remove the database instance running on that server.
You can delete an instance from the cluster using either the Instance Management option of Database Configuration Assistant (DBCA) or using Enterprise Manager. If you choose to use DBCA to delete an instance, start the DBCA utility from a node that will remain part of the cluster.
When you delete an instance from a clustered database, there are two methods:
Note:
The steps described in this section require a license for the Enterprise Manager Provisioning Management pack. Refer to the Oracle Database Licensing Information for information about the availability of these features on your system.To delete an instance from a policy-managed databases, you simply decrease the cardinality of the server pool for the database. The database instance and ASM instance on the deallocated node are removed from the cluster and the node is either reassigned to another server pool or placed in the Free pool.
To delete a policy-managed database instance using Enterprise Manager:
Log in to Oracle Enterprise Manager Database Control (Database Control) as a SYSDBA user.
From the Cluster Database Home page, click Server.
On the Server subpage, under the heading Change Database, click Delete Instance.
The Edit Server Pool page appears.
Enter the credentials for the Oracle Database software owner and the SYSASM user, then click Next.
The Delete Instance: Database Instance page appears
Modify the server pool settings then click Submit.
Click the Database tab to return to the Cluster Database Home page.
Review the number of instances available for your cluster database.
To remove an instance from an administrator-managed database, you must specify the name of the database instance to delete and which node the instance is running on.
To delete an administrator-managed database instance using Enterprise Manager:
Log in to Oracle Enterprise Manager Database Control (Database Control) as a SYSDBA user.
From the Cluster Database Home page, click Server.
On the Server subpage, under the heading Change Database, click Delete Instance.
The Delete Instance: Cluster Credentials page appears.
Enter the credentials for the Oracle Database software owner and the SYSASM user, then click Next.
The Delete Instance: Database Instance page appears
Select the instance you want to delete, then click Next.
After the host information has been validated, the Delete Instance: Review page appears.
Review the information, and if correct, click Submit Job to continue. Otherwise, click Back and correct the information.
A Confirmation page appears.
Click View Job to view the status of the node deletion job.
A Job Run detail page appears.
Click your browser's Refresh button until the job shows a status of Succeeded or Failed.
If the job shows a status of Failed, you can click the name of the step that failed to view the reason for the failure.
Click the Cluster tab to view to the Cluster Home page.
The number of hosts available in the cluster database is reduced by one.
Removing a node from the cluster can be as easy as simply shutting down the server. As long as the node was not pinned and does not host any Oracle databases prior to Oracle Database 11g release 2, the node is automatically removed from the cluster when it is shut down. If the node was pinned or hosts database instance from previous releases, then explicit deletion is needed.
To repurpose this server, you can restart the node with a different profile in place, or you can use other software to put a new software image on the server.
If you have licensed the Oracle Enterprise Manager RAC Provisioning pack, you can also use the "Scale down Oracle Real Application Clusters" deployment procedure to remove a node from your cluster.
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database