1) make a successful CRS home install once [an existing clusterware it can be, actively in use]
2) Apply necessary PSU/oneoffs
3) Shutdown the CRS stack
4) copy the working GI home to a new location using cp -prf
cp -prf Grid_home copy_path
5) Delete unneccessary files
[root@node1 root]# cd copy_path
[root@node1 grid]# rm -rf crs/install/crsconfig_addparams
[root@node1 grid]# rm -rf host_name
[root@node1 grid]# rm -rf log/host_name
[root@node1 grid]# rm -rf gpnp/host_name
[root@node1 grid]# find gpnp -type f -exec rm -f {} \;
[root@node1 grid]# find cfgtoollogs -type f -exec rm -f {} \;
[root@node1 grid]# rm -rf crs/init/*
[root@node1 grid]# rm -rf cdata/*
[root@node1 grid]# rm -rf crf/*
[root@node1 grid]# rm -rf network/admin/*.ora
[root@node1 grid]# find . -name '*.ouibak' -exec rm {} \;
[root@node1 grid]# find . -name '*.ouibak.1' -exec rm {} \;
[root@node1 grid]# rm -rf root.sh*
(there is an option to exclude the files as well, but that seems missing few files in the oracle doc)
6) create a compressed copy of the previously copied GI home using tar or gzip. Ensure to use right tool to protect the permissons.
cd copy_path
tar -zcvpf /copy_path/gridHome.tgz .
7) Prepare target cluster nodes by following the prereqs.
8) Copy and unzip (from the target grid home location) the compressed binary copy we secured in the previous step using tar command.
[root@node1 root]# mkdir -p location_of_the_copy_of_the_Grid_home
[root@node1 root]# cd location_of_the_copy_of_the_Grid_home
[root@node1 crs]# tar -zxvf /path_name/gridHome.tgz
9) create the oracle inventory directory and change the permisson for the GI Home mountpoint as needed.
[root@node1 crs]# mkdir /u01
[root@node1 crs]# chown oracle:oinstall /u01
[root@node1 crs]# mkdir -p /u01/app/oraInventory
[root@node1 crs]# mkdir -p /u01/app/11.2.0/grid
On the above command being launched the below file's permisson is lost...
Grid_home/bin/extjob
Grid_home/bin/jssu
Grid_home/bin/oradism
Run the following commands to restore the cleared information:
chmod u+s Grid_home/bin/oracle
chmod g+s Grid_home/bin/oracle
chmod u+s Grid_home/bin/extjob
chmod u+s Grid_home/bin/jssu
chmod u+s Grid_home/bin/oradism
10) Remove any unncessary files we didnt remove during the compressed tarball preperation.
11) Launch the clone.pl on each node [from Grid_home/clone/bin] using [variables prepopulated] start.sh script [ensure you only run orainstRoot.sh and avoid running
root.sh]
===
cd Grid_home/clone/bin
>>> start.sh content below..
#!/bin/sh
ORACLE_BASE=/u01/app/oracle
GRID_HOME=/u01/app/11.2.0/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="-O'-debug'"
C01="-O'\"CLUSTER_NODES={node1,node2}\"'"
C02="-O'\"LOCAL_NODE=${THIS_NODE}\"'"
perl ${GRID_HOME}/clone/bin/clone.pl -silent $E01 $E02 $E03 $E04 $C01 $C02
===
12) Launch the config wizard to
a) prepare the crsconfig_params file,
b) prompts you to run the root.sh script (which calls the rootcrs.pl script),
c) relinks Oracle binaries and
d) runs cluster verifications.
$Oracle_home/crs/config/config.sh
==================================This ends the oracle GI Home cloning to new cluster procedure.
For add node also oracle has outlined the cloning procedure, but there is a catch with rootcrs.pl
Document refered: https://docs.oracle.com/cd/E11882_01/rac.112/e41959/clonecluster.htm#CWADD92359
2) Apply necessary PSU/oneoffs
3) Shutdown the CRS stack
4) copy the working GI home to a new location using cp -prf
cp -prf Grid_home copy_path
5) Delete unneccessary files
[root@node1 root]# cd copy_path
[root@node1 grid]# rm -rf crs/install/crsconfig_addparams
[root@node1 grid]# rm -rf host_name
[root@node1 grid]# rm -rf log/host_name
[root@node1 grid]# rm -rf gpnp/host_name
[root@node1 grid]# find gpnp -type f -exec rm -f {} \;
[root@node1 grid]# find cfgtoollogs -type f -exec rm -f {} \;
[root@node1 grid]# rm -rf crs/init/*
[root@node1 grid]# rm -rf cdata/*
[root@node1 grid]# rm -rf crf/*
[root@node1 grid]# rm -rf network/admin/*.ora
[root@node1 grid]# find . -name '*.ouibak' -exec rm {} \;
[root@node1 grid]# find . -name '*.ouibak.1' -exec rm {} \;
[root@node1 grid]# rm -rf root.sh*
(there is an option to exclude the files as well, but that seems missing few files in the oracle doc)
6) create a compressed copy of the previously copied GI home using tar or gzip. Ensure to use right tool to protect the permissons.
cd copy_path
tar -zcvpf /copy_path/gridHome.tgz .
7) Prepare target cluster nodes by following the prereqs.
8) Copy and unzip (from the target grid home location) the compressed binary copy we secured in the previous step using tar command.
[root@node1 root]# mkdir -p location_of_the_copy_of_the_Grid_home
[root@node1 root]# cd location_of_the_copy_of_the_Grid_home
[root@node1 crs]# tar -zxvf /path_name/gridHome.tgz
9) create the oracle inventory directory and change the permisson for the GI Home mountpoint as needed.
[root@node1 crs]# mkdir /u01
[root@node1 crs]# chown oracle:oinstall /u01
[root@node1 crs]# mkdir -p /u01/app/oraInventory
[root@node1 crs]# mkdir -p /u01/app/11.2.0/grid
On the above command being launched the below file's permisson is lost...
Grid_home/bin/extjob
Grid_home/bin/jssu
Grid_home/bin/oradism
Run the following commands to restore the cleared information:
chmod u+s Grid_home/bin/oracle
chmod g+s Grid_home/bin/oracle
chmod u+s Grid_home/bin/extjob
chmod u+s Grid_home/bin/jssu
chmod u+s Grid_home/bin/oradism
10) Remove any unncessary files we didnt remove during the compressed tarball preperation.
11) Launch the clone.pl on each node [from Grid_home/clone/bin] using [variables prepopulated] start.sh script [ensure you only run orainstRoot.sh and avoid running
root.sh]
===
cd Grid_home/clone/bin
>>> start.sh content below..
#!/bin/sh
ORACLE_BASE=/u01/app/oracle
GRID_HOME=/u01/app/11.2.0/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="-O'-debug'"
C01="-O'\"CLUSTER_NODES={node1,node2}\"'"
C02="-O'\"LOCAL_NODE=${THIS_NODE}\"'"
perl ${GRID_HOME}/clone/bin/clone.pl -silent $E01 $E02 $E03 $E04 $C01 $C02
===
12) Launch the config wizard to
a) prepare the crsconfig_params file,
b) prompts you to run the root.sh script (which calls the rootcrs.pl script),
c) relinks Oracle binaries and
d) runs cluster verifications.
$Oracle_home/crs/config/config.sh
==================================This ends the oracle GI Home cloning to new cluster procedure.
For add node also oracle has outlined the cloning procedure, but there is a catch with rootcrs.pl
Document refered: https://docs.oracle.com/cd/E11882_01/rac.112/e41959/clonecluster.htm#CWADD92359
No comments:
Post a Comment