[oracle@my562b bin]$ ./detachHome.sh

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4094 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /apps/oraInventory
‘DetachHome’ was successful.

The contents of the inventory XML file looks like this:
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″ REMOVED=”T”/>
</HOME_LIST>
</INVENTORY>
 

[oracle@my562b bin]$ perl clone.pl -silent ORACLE_BASE=/apps/oracle ORACLE_HOME=/apps/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 INVENTORY_LOCATION=/apps/oraInventory

./runInstaller -clone -waitForCompletion  “ORACLE_BASE=/apps/oracle” “ORACLE_HOME=/apps/11.2.0/grid” “ORACLE_HOME_NAME=Ora11g_gridinfrahome1” “INVENTORY_LOCATION=/apps/oraInventory” -silent -noConfig -nowait
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4094 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-09_11-33-45AM. Please wait …
 
Copyright (C) 1999, 2010, Oracle. All rights reserved.


You can find the log of this install session at:
 /apps/oraInventory/logs/cloneActions2011-05-09_11-35-10AM.log
………………………………………………………………………………………. 100% Done.


Could not backup file /apps/11.2.0/grid/rootupgrade.sh to /apps/11.2.0/grid/rootupgrade.sh.ouibak
Could not backup file /apps/11.2.0/grid/root.sh to /apps/11.2.0/grid/root.sh.ouibak

Installation in progress (Monday, May 9, 2011 11:35:29 AM CDT)
………………………………………………………………                                                        72% Done.
Install successful

Linking in progress (Monday, May 9, 2011 11:35:38 AM CDT)

Link successful

Setup in progress (Monday, May 9, 2011 11:36:57 AM CDT)
…………….                                                100% Done.
Setup successful

End of install phases.(Monday, May 9, 2011 11:37:05 AM CDT)
WARNING:
The following configuration scripts need to be executed as the “root” user.
/apps/11.2.0/grid/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as “root”
    3. Run the scripts
   
Run the script on the local node.
The cloning of Ora11g_gridinfrahome1 was successful.
Please check ‘/apps/oraInventory/logs/cloneActions2011-05-09_11-35-10AM.log’ for more details.

Contents of inventory XML after the clone:
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
</HOME_LIST>
</INVENTORY>


[oracle@my562b bin]$ cd ../..
[oracle@my562b grid]$ ./root.sh
Check /apps/11.2.0/grid/install/root_my562b_2011-05-09_11-39-15.log for the output of root script




What a mess .. trying force delete and re-configuring GRID Home

I don’t think I need to go through the exercise of detaching and re-cloning the oracle home
I think the roothas.pl with the deconfig option followed with the force option works if all else fails.
The other option to deconfig is:
$ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/roothas.pl -delete

[root@my562b utl]# /apps/11.2.0/grid/crs/install/roothas.pl -deconfig -force

Using configuration parameter file: /apps/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CLSU-00100: Operating System function: opendir failed with error data: 2
CLSU-00101: Operating System error message: No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information: cant open scr home dir scls_scr_getval
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
ACFS-9459: ADVM/ACFS is not supported on this OS version: ‘2.6.32-100.26.2.el5
ACFS-9201: Not Supported
Successfully deconfigured Oracle Restart stack
[root@my562b utl]# $ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/roothas.pl
Using configuration parameter file: /apps/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘oracle’, privgrp ‘oinstall’..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
CRS-4664: Node my562b successfully pinned.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: ‘2.6.32-100.26.2.el5

my562b     2011/05/09 11:50:06     /apps/11.2.0/grid/cdata/my562b/backup_20110509_115006.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

[root@my562b bin]# ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘my562b’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘my562b’
CRS-2677: Stop of ‘ora.evmd’ on ‘my562b’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘my562b’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@my562b bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.


[oracle@my562b admin]$ srvctl add listener
[oracle@my562b admin]$ srvctl add asm -d ‘ORCL:*’
[oracle@my562b admin]$ srvctl start listener
[oracle@my562b admin]$ srvctl start asm
[oracle@my562b admin]$ srvctl status diskgroup -g data
PRCA-1000 : ASM Disk Group DATA does not exist
PRCR-1001 : Resource ora.DATA.dg does not exist

[oracle@my562b admin]$ asmcmd

ASMCMD> lsdg
ASMCMD> mount data   
ASMCMD> mount mydata
ASMCMD> mount myfra


Now the database home 

[oracle@my562b bin]$ ./detachHome.sh

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4091 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /apps/oraInventory
‘DetachHome’ was successful.


[root@my562b bin]# cd /apps/oraInventory/ContentsXML/
You have new mail in /var/spool/mail/root
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
</HOME_LIST>
</INVENTORY>


[oracle@my562b bin]$ cd ../../clone/bin

[oracle@my562b bin]$ perl clone.pl -silent ORACLE_BASE=/apps/oracle ORACLE_HOME=/apps/oracle/product/11.2.0/db ORACLE_HOME_NAME=OraDb11g_home1 INVENTORY_LOCATION=/apps/oraInventory

./runInstaller -clone -waitForCompletion  “ORACLE_BASE=/apps/oracle” “ORACLE_HOME=/apps/oracle/product/11.2.0/db” “ORACLE_HOME_NAME=OraDb11g_home1” “INVENTORY_LOCATION=/apps/oraInventory” -silent -noConfig -nowait
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4090 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-09_12-13-20PM. Please wait …Oracle Universal Installer, Version 11.2.0.2.0 Production
Copyright (C) 1999, 2010, Oracle. All rights reserved.

You can find the log of this install session at:
 /apps/oraInventory/logs/cloneActions2011-05-09_12-13-20PM.log
………………………………………………………………………………………. 100% Done.



Installation in progress (Monday, May 9, 2011 12:13:56 PM CDT)
……………………………………………………………………                                                  78% Done.
Install successful

Linking in progress (Monday, May 9, 2011 12:14:05 PM CDT)

Link successful

Setup in progress (Monday, May 9, 2011 12:17:12 PM CDT)
Setup successful

End of install phases.(Monday, May 9, 2011 12:17:18 PM CDT)
WARNING:
The following configuration scripts need to be executed as the “root” user.
/apps/oracle/product/11.2.0/db/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as “root”
    3. Run the scripts
   
The cloning of OraDb11g_home1 was successful.
Please check ‘/apps/oraInventory/logs/cloneActions2011-05-09_12-13-20PM.log’ for more details.


[root@my562b ContentsXML]# cd /apps/oracle/product/11.2.0/db
[root@my562b db]# ./root.sh
Check /apps/oracle/product/11.2.0/db/install/root_my562b_2011-05-09_12-19-12.log for the output of root script


[root@my562b db]# cd –
/apps/oraInventory/ContentsXML
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
</HOME_LIST>
</INVENTORY>

One Comment

  1. Greg
    Posted October 10, 2012 at 9:04 pm | Permalink

    Thanks, it worked for me, I skipped the clone and did the deconfig, reconfig. asm came up after I brought over the oratab from the source and ran asmca.

    I used a neat little tar command to bring the oracle homes over.

    tar -cf – /opt/oracle/grid3 | ssh root@newserver ‘cd /; tar -xf -‘

    no tarball, it just copies over with links intact.

Leave a Reply

Your email address will not be published. Required fields are marked *

*