Because the clone.pl
script is sensitive to the parameter values that it receives, you must be accurate in your use of brackets, single quotation marks, and double quotation marks. To avoid errors, create a file that is similar to the start.sh
script shown in Example 8-1 in which you can specify environment variables and cloning parameters for the clone.pl
script.
Example 8-1 shows an excerpt from an example script called start.sh
that calls the clone.pl
script; the example is configured for a cluster named crscluster
. Run the script as the operating system user that installed Oracle Clusterware.
Note:
On Solaris systems, there is no -s
following hostname
.
The start.sh
script sets several environment variables and cloning parameters, as described in Table 8-2. Table 8-2 describes the environment variables E01
, E02
, E03
, and E04
that are shown in bold typeface in Example 8-1, and C01
and C02
.
Table 8-2 Environment Variables Passed to the clone.pl Script
Symbol | Variable | Description |
---|---|---|
|
|
The ___location of the Oracle base directory. |
|
|
The ___location of the Oracle Grid Infrastructure home. This directory ___location must exist and must be owned by the Oracle operating system group: OINSTALL. |
|
|
The name of the Oracle Grid Infrastructure home. This is stored in the Oracle Inventory. |
|
|
The ___location of the Oracle Inventory. This directory ___location must exist and must initially be owned by the Oracle operating system group: OINSTALL. |
|
|
A comma-delimited list of short node names for the nodes in the cluster. |
|
|
The short name of the local node. |
Example 8-1 Excerpt From the start.sh Script to Clone Oracle Clusterware
#!/bin/sh ORACLE_BASE=/u01/app/oracle GRID_HOME=/u01/app/12.1/grid THIS_NODE=`hostname -s` E01=ORACLE_BASE=${ORACLE_BASE} E02=ORACLE_HOME=${GRID_HOME} E03=ORACLE_HOME_NAME=OraGridHome1 E04=INVENTORY_LOCATION=${ORACLE_BASE}/../oraInventory #C00="-debug"
C01="CLUSTER_NODES={node1,node2}" C02="LOCAL_NODE=$THIS_NODE" perl ${GRID_HOME}/clone/bin/clone.pl -silent $E01 $E02 $E03 $E04 $C01 $C02 CRS=TRUE