When cloning a database home onto a new server, the clone.pl script threw the following error:
perl clone.pl ORACLE_HOME=/u01/oracle/product/11204 ORACLE_HOME_NAME=11204
SEVERE: OUI-10197:Unable to create a new Oracle Home at /u01/oracle/product/11204. Oracle Home already exists at this location. Select another location.
The server was freshly installed, new volume Groups, logical Volume Groups and file systems newly created.
I then realized that since the software was tared and untared into a new directory, there would potentially be an existing Oracle Inventory present, and I would needed to "detach" the ORACLE_HOME before cloning it. The tarball did indeed contain an Inventory:
myserver>cd $ORACLE_HOME
myserver>cat oraInst.loc.org
inventory_loc=/u01/oracle/oraInventory
inst_group=dba
Since there was no such directory present, I created it:
myserver>mkdir /u01/oracle/oraInventory/ContentsXML/
myserver>cd /u01/oracle/oraInventory/ContentsXML/
myserver>vi inventory.xml
In the file inventory.xml, I added the following minimal information:
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<inventory>
<version_info>
<saved_with>11.2.0.4.0</saved_with>
<minimum_ver>2.1.0.6.0</minimum_ver>
</version_info>
<home_list>
<home idx="1" loc="/u01/oracle/product/11204" name="11204" type="O">
</home></home_list>
<compositehome_list>
</compositehome_list>
</inventory>
I then added
-invPtrLoc /u01/oracle/product/11204/oraInst.loc
to file $ORACLE_HOME/clone/config/cs.properties
Next, I detached the ORACLE_HOME:
myserver>cd $ORACLE_HOME/oui/bin
myserver>./runInstaller -detachHome ORACLE_HOME=/u01/oracle/product/11204 -invPtrLoc /u01/oracle/product/11204/oraInst.loc
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed
The inventory pointer is located at /u01/oracle/product/11204/oraInst.loc
The inventory is located at /u01/oracle/oraInventory
'DetachHome' was successful.
Finally I was able to clone the ORACLE_HOME:
perl clone.pl ORACLE_HOME=/u01/oracle/product/11204 ORACLE_HOME_NAME=11204 ORACLE_BASE=/u01/oracle OSDBA_GROUP=dba
********************************************************************************
Your platform requires the root user to perform certain pre-clone
OS preparation. The root user should run the shell script 'rootpre.sh' before
you proceed with cloning. rootpre.sh can be found at
/u01/oracle/product/11204/clone directory.
Answer 'y' if the root user has run 'rootpre.sh' script.
********************************************************************************
Has 'rootpre.sh' been run by the root user? [y/n] (n)
y
./runInstaller -clone -waitForCompletion "ORACLE_HOME=/u01/oracle/product/11204" "ORACLE_HOME_NAME=11204" "ORACLE_BASE=/u01/oracle" "oracle_install_OSDBA=dba" -silent -noConfig -nowait -invPtrLoc /u01/oracle/product/11204/oraInst.loc
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-11_03-12-31PM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/oracle/oraInventory/logs/cloneActions2014-06-11_03-12-31PM.log
.................................................................................................... 100% Done.
Installation in progress (Wednesday, June 11, 2014 3:12:45 PM CEST)
................................................................................ 80% Done.
Install successful
Linking in progress (Wednesday, June 11, 2014 3:12:54 PM CEST)
Link successful
Setup in progress (Wednesday, June 11, 2014 3:15:32 PM CEST)
Setup successful
End of install phases.(Wednesday, June 11, 2014 3:15:59 PM CEST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/u01/oracle/product/11204/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of 11204 was successful.
Please check '/u01/oracle/oraInventory/logs/cloneActions2014-06-11_03-12-31PM.log' for more details.