Migrating Standalone Oracle Grid Infrastructure Servers to a Cluster
If you have an Oracle Database installation using Oracle Restart (that is, an Oracle Grid Infrastructure installation for a standalone server), and you want to configure that server as a cluster member node, then complete the following tasks:
-
List all the Oracle databases on the server with their version, unique name of the database, and Oracle home information:
srvctl config database -home -
Inspect the Oracle Restart configuration of each database with
srvctlusing the following syntax, where db_unique_name is the unique name of the database, and lsnrname is the name of the listener:$ srvctl config database -db db_unique_name $ srvctl config service -db db_unique_name $ srvctl config listener -listener lsnrnameWrite down the configuration information for the server.
-
Stop all of the databases, services, and listeners that you discovered in step 1.
-
If present, unmount all Oracle Automatic Storage Management Cluster File System (Oracle ACFS) file systems.
-
As the
rootuser, unconfigure the Oracle Grid Infrastructure installation for a standalone server (Oracle Restart).# Oracle_Restart_Grid_home/crs/install/roothas.sh -deconfig -force -
As the
griduser, update the Oracle central inventory (oraInventory).$ Oracle_Restart_Grid_home/oui/bin/runInstaller -nowait -waitforcompletion -ignoreSysPrereqs -updateNodeList -silent -local CRS=false ORACLE_HOME=Grid_home "CLUSTER_NODES=node_list" -doNotUpdateNodeList" -
Open the
/etc/oratabfile and remove the entry corresponding tooracle_restart_home, in the following format:+ASM:oracle_restart_home:N -
Prepare the server for Oracle Clusterware configuration, as described in this document. In addition, you can install Oracle Grid Infrastructure for a cluster in the same location as Oracle Restart, or in a different location.
Installing in the Same Location as Oracle Restart
-
Unlock the Oracle Grid Infrastructure installation for a standalone server (Oracle Restart) home, using the following command:
# Oracle_Restart_home/roothas.sh -unlock -hahome Oracle_Restart_home -
Proceed to step 9.
Installing in a Different Location than Oracle Restart
-
Set up Oracle Grid Infrastructure software in the new Grid home software location as described in Installing Only the Oracle Grid Infrastructure Software.
-
Proceed to step 10.
-
-
To use an existing disk group for the Oracle Cluster Registry (OCR), voting files, and Oracle Automatic Storage Management (Oracle ASM) server parameter file (
spfile) during Oracle Clusterware installation, specify the following:$ export oracle_install_asm_UseExistingDG=true $ export oracle_install_asm_DiskGroupName=disk_group_name $ export oracle_install_asm_DiskDiscoveryString=asm_discovery_stringTo use a new disk or disk group during migration to Oracle Clusterware, set the
oracle_install_asm_UseExistingDG=falseenvironment variable and select the disks when you rungridSetup.shin step 10.Note:
Whenoracle_install_asm_UseExistingDG=false, the other environment variables listed above are not required. -
As the Oracle Grid Infrastructure installation owner, create and stage the response file for this installation as described in Recording Response Files.
-
Complete the installation in the silent mode using the following command:
$ target_grid_home/gridSetup.sh -silent -responseFile $ORACLE_HOME/GI.rsp -
Run the
target_grid_home/root.shscript as prompted by the installer. -
Mount all the remaining Oracle ASM disk groups that were used in Oracle Restart.
-
If you used Oracle ACFS with Oracle Restart, then:
-
Start Oracle ASM Configuration Assistant (ASMCA). Run the
volenablecommand to enable all Oracle Restart disk group volumes. -
Mount all Oracle ACFS file systems manually.
-
-
Add back Oracle Clusterware services to the Oracle Clusterware home, using the information you wrote down in step 1, including adding back Oracle ACFS resources. For example:
$ target_grid_home/bin/srvctl add filesystem -device acfs_device_path -diskgroup acfs_diskgroup -volume db1 -mountpointpath acfs_mount_path -user user_list -
Add the Oracle Database for support by Oracle Grid Infrastructure for a cluster, using the configuration information you recorded in step 1. Use the following command syntax, where db_unique_name is the unique name of the database on the node, and nodename is the name of the node:
srvctl add database -dbdb_unique_name-diskgroup disk_group_name -spfile spfile_name -pwfile pwfile_name-oraclehome $ORACLE_HOME -nodenodename-
For example, first verify that the
ORACLE_HOMEenvironment variable is set to the location of the database home directory. -
Next, to add the database name
mydb, enter the following command:srvctl add database -db mydb -spfile spfile_name -diskgroup disk_group_name -pwfile pwfile_name -oraclehome $ORACLE_HOME -node node1 -
Add each service to the database, using the command
srvctl add service. For example, addmyserviceas follows:srvctl add service -db mydb -service myservice -preferred myinstance
-
-
Add nodes to your cluster, as required, using the Oracle Grid Infrastructure installer.
See Also:
Oracle Clusterware Administration and Deployment Guide for information about adding nodes to your cluster.Parent topic: Removing Oracle Database Software