一、处理原有CRS的故障
到现场后发现
[sndb2:/oracle]$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....b1.inst application ONLINE OFFLINE
ora....B1.lsnr application ONLINE ONLINE sndb1
ora.sndb1.gsd application ONLINE ONLINE sndb1
ora.sndb1.ons application ONLINE ONLINE sndb1
ora.sndb1.vip application ONLINE ONLINE sndb1
ora....B2.lsnr application ONLINE ONLINE sndb2
ora.sndb2.gsd application ONLINE ONLINE sndb2
ora.sndb2.ons application ONLINE ONLINE sndb2
ora.sndb2.vip application ONLINE ONLINE sndb2
这里明显丢失了2个服务ora.sndb.sndb2.inst 和 ora.sndb.sndb.db
处理过程:
1、首先找到最新的OCR备份
Ocrconfig –restore /oracle/crs/product/app/cdata/week.ocr
发现仍然去少上述2个服务,只能手工添加相应的服务
2、手工添加服务
$ srvctl add database -d sndb -o /oracle/product/database -p '/dev/rsndb_spfile'
$ srvctl add instance -d sndb -i sndb2 -n sndb2
$ crs_unregister ora.sndb.sndb1.inst
$ srvctl add instance -d sndb -i sndb1 -n sndb1
处理后CRS恢复正常。
二添加节点
1、首先执行/oracle/crs/product/app/oui/bin/addNode.sh
报如下错误:
INFO: Environment Variables:
INFO: ORACLE_HOME = /oracle/product/database
INFO: PATH = /usr/bin:/etc:/usr/sbin:/usr/ucb:/oracle/bin:/usr/bin/X11:/sbin:.:/usr/X11R6/bin:/oracle/product/database/bin:/usr/bin:/usr/sbin:/oracle/crs/product/app/bin
INFO: CLASSPATH =
INFO: Username:oracle
INFO: Oracle Universal Installer version is 10.2.0.1.0
INFO: Setting variable 'ORACLE_HOME' to '/oracle/crs/product/app'. Received the value from the command line.
INFO: Setting variable 'PREREQ_CONFIG_LOCATION' to ''. Received the value from variable association.
INFO: Setting variable 'FROM_LOCATION' to '/oracle/crs/product/app/inventory/ContentsXML/comps.xml'. Received the value from a code block.
INFO: Setting variable 'ROOTSH_LOCATION' to '/oracle/crs/product/app/root.sh'. Received the value from a code block.
INFO: Setting variable 'ROOTSH_STATUS' to '3'. Received the value from a code block.
INFO: Setting variable 'ORACLE_HOME' to '/oracle/crs/product/app'. Received the value from the command line.
INFO: Setting variable 'PREREQ_CONFIG_LOCATION' to ''. Received the value from variable association.
INFO: Setting variable 'FROM_LOCATION' to '/oracle/crs/product/app/inventory/ContentsXML/comps.xml'. Received the value from a code block.
INFO: Setting variable 'ROOTSH_LOCATION' to '/oracle/crs/product/app/root.sh'. Received the value from a code block.
INFO: Setting variable 'ROOTSH_STATUS' to '3'. Received the value from a code block.
INFO:
*** Welcome Page***
INFO: Setting variable 'ORACLE_HOME_NAME' to 'OUIHome1'. Received the value from a code block.
INFO: SRVM ClusterInfo.IsLocalOnly() called. Return value obtained is 'true'.
INFO: The CRS clusterware location for 'oracle.crs 10.1.0.2.0' is '/oracle/crs/product/app'.
INFO: CRS clusterware detected.
INFO: List of nodes returned by the clusterware:sndb2,sndb1,snzc3
INFO: Local node returned by the clusterware:sndb2
INFO: Vendor clusterware detected.
INFO: List of nodes returned by the clusterware:sndb2,sndb1,snzc3
INFO: Local node returned by the clusterware:sndb2
INFO: Vendor clusterware detected.
INFO: Local node 'sndb1_boot' is derived from the Oracle home properties.
INFO: Setting variable 'LOCAL_NODE' to 'sndb1_boot'. Received the value from a code block.
INFO: Setting variable 'EXISTING_REMOTE_NODES' to 'sndb2_boot,'. Received the value from a code block.
SEVERE: oracle.ops.mgmt.cluster.ClusterInfoException:
at oracle.ops.mgmt.cluster.ClusterInfo.getOraclePrivateName(ClusterInfo.java:480)
at oracle.sysman.oii.oiip.oiipg.OiipgCRSClusterwareInfo.getPrivateNodeName(OiipgCRSClusterwareInfo.java:336)
at oracle.sysman.oii.oiip.oiipg.OiipgDetectCluster.getPrivateNodeName(OiipgDetectCluster.java:454)
at oracle.sysman.oii.oiif.oiifw.OiifwAddNodeWCDE.getPrivateNodeNames(OiifwAddNodeWCDE.java:520)
at oracle.sysman.oii.oiif.oiifw.OiifwAddNodeWCDE.initialize(OiifwAddNodeWCDE.java:341)
at oracle.sysman.oii.oiif.oiifb.OiifbCondIterator.iterate(OiifbCondIterator.java:152)
at oracle.sysman.oii.oiic.OiicPullSession.doOperation(OiicPullSession.java:1273)
at oracle.sysman.oii.oiic.OiicSessionWrapper.doOperation(OiicSessionWrapper.java:289)
at oracle.sysman.oii.oiic.OiicInstaller.run(OiicInstaller.java:546)
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:929)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)
SEVERE: oracle.ops.mgmt.cluster.ClusterInfoException:
at oracle.ops.mgmt.cluster.ClusterInfo.getOraclePrivateName(ClusterInfo.java:480)
at oracle.sysman.oii.oiip.oiipg.OiipgCRSClusterwareInfo.getPrivateNodeName(OiipgCRSClusterwareInfo.java:336)
at oracle.sysman.oii.oiip.oiipg.OiipgDetectCluster.getPrivateNodeName(OiipgDetectCluster.java:454)
at oracle.sysman.oii.oiif.oiifw.OiifwAddNodeWCDE.getPrivateNodeNames(OiifwAddNodeWCDE.java:520)
at oracle.sysman.oii.oiif.oiifw.OiifwAddNodeWCDE.initialize(OiifwAddNodeWCDE.java:341)
at oracle.sysman.oii.oiif.oiifb.OiifbCondIterator.iterate(OiifbCondIterator.java:152)
at oracle.sysman.oii.oiic.OiicPullSession.doOperation(OiicPullSession.java:1273)
at oracle.sysman.oii.oiic.OiicSessionWrapper.doOperation(OiicSessionWrapper.java:289)
at oracle.sysman.oii.oiic.OiicInstaller.run(OiicInstaller.java:546)
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:929)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)
INFO: Setting col:0:205
INFO: Set col:0:205
INFO: Setting col:1:189
INFO: Set col:1:189
INFO: Setting col:2:180
INFO: Set col:2:180
INFO: Setting col:0:205
INFO: Set col:0:205
INFO: Setting col:1:189
INFO: Set col:1:189
INFO: Setting col:2:180
INFO: Set col:2:180
INFO: Setting the 'ExistingClusterNodes' property to 'sndb1_boot,sndb2_boot,'.
INFO: Setting the 'ExistingPrivateNodeNames' property to 'null,null,'.
INFO: Setting the 'ExistingVirtualHostNames' property to 'null,null,'.
INFO: Setting the 'EnableVirtualHostNameEntry' property to 'true'.
INFO: Setting the 'NewNodes ( CLUSTER_NEW_NODES )' property to 'sndb2,sndb1,snzc3,'. Received the value from the UI page.
INFO: Setting the 'NewPrivateNodeNames ( CLUSTER_NEW_PRIVATE_NODE_NAMES )' property to 'sndb2_priv,sndb1_priv,snzc3_priv,'. Received the value from the UI page.
INFO: Setting the 'NewVirtualHostNames ( CLUSTER_NEW_VIRTUAL_HOSTNAMES )' property to 'sndb2_vip,sndb1_vip,snzc3_vip,'. Received the value from the UI page.
INFO: Setting variable 'REMOTE_NODES' to 'sndb2,sndb1,snzc3,'. Received the value from a code block.
INFO: Setting variable 'CLUSTER_NODES' to 'sndb1_boot,sndb2_boot,sndb2,sndb1,snzc3,'. Received the value from a code block.
INFO: Performing tests to see whether nodes sndb2_boot,sndb2,sndb1,snzc3 are available
INFO: Validating nodes sndb2_boot...
INFO: Checking if nodes are alive...
INFO: Validating user equivalence...
INFO: Validating nodes sndb2,sndb1,snzc3...
INFO: Checking if nodes are alive...
INFO: Validating user equivalence...
INFO: Checking if remote nodes are clean machines...
INFO: Validating private node names...
INFO: Validating virtual hostnames...
SEVERE: Abnormal program termination. An internal error has occured. Please provide the following files to Oracle Support :
"/oracle/app/oracle/oraInventory/logs/addNodeActions2009-06-29_04-17-20AM.log"
"/oracle/app/oracle/oraInventory/logs/oraInstall2009-06-29_04-17-20AM.err"
"/oracle/app/oracle/oraInventory/logs/oraInstall2009-06-29_04-17-20AM.out"
INFO: User Selected: Yes/OK
处理办法:
将节点的CRS_HOME tar到节点3,在节点三上执行:
[snzc3:/oracle/crs/product/app/oui/bin]$./addNode.sh -silent "CLUSTER_NEW_NODES={snzc3}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={snzc3_priv"CLUSTER_NEW_PRIVATE_NODE_NAMES={snzc3_priv}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={snzc3_vip}" -noCopy<
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Oracle Universal Installer, Version 10.2.0.4.0 Production
Copyright (C) 1999, 2008, Oracle. All rights reserved.
Performing tests to see whether nodes sndb2_boot,snzc3 are available
............................................................... 100% Done.
.
-----------------------------------------------------------------------------
Cluster Node Addition Summary
Global Settings
Source: /oracle/crs/product/app
New Nodes
Space Requirements
New Nodes
snzc3
/oracle: Required 4.31GB : Available 2.07GB
Installed Products
Product Names
Oracle Clusterware 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
Oracle Required Support Files 32 bit 10.2.0.0.0
Oracle Clusterware RDBMS Files 10.2.0.1.0
Bali Share 1.1.18.0.0
Oracle Extended Windowing Toolkit 3.4.38.0.0
Buildtools Common Files 10.2.0.1.0
Oracle Notification Service 10.1.0.3.0
Oracle RAC Required Support Files-HAS 10.2.0.1.0
SQL*Plus Required Support Files 10.2.0.1.0
DBJAVA Required Support Files 10.2.0.1.0
XDK Required Support Files 10.2.0.1.0
Agent Required Support Files 10.2.0.1.0
Parser Generator Required Support Files 10.2.0.1.0
Precompiler Required Support Files 10.2.0.1.0
Platform. Required Support Files 10.2.0.1.0
Oracle Core Required Support Files 10.2.0.1.0
Perl Interpreter 5.8.3.0.1
Oracle Ice Browser 5.2.3.6.0
Oracle JFC Extended Windowing Toolkit 4.2.33.0.0
SSL Required Support Files for InstantClient 10.2.0.1.0
Oracle Help For Java 4.2.6.1.0
Oracle Net Required Support Files 10.2.0.1.0
LDAP Required Support Files 10.2.0.1.0
RDBMS Required Support Files for Instant Client 10.2.0.1.0
RDBMS Required Support Files 10.2.0.1.0
Enterprise Manager Minimal Integration 10.2.0.1.0
Oracle Locale Builder 10.2.0.1.0
Oracle Globalization Support 10.2.0.1.0
HAS Common Files 10.2.0.1.0
Cluster Ready Services Files 10.2.0.1.0
Required Support Files 10.2.0.1.0
Sun JDK 1.4.2.14.0
Java Runtime Environment 1.4.2.14.0
Installer SDK Component 10.2.0.4.0
Oracle One-Off Patch Installer 10.2.0.4.0
Oracle Universal Installer 10.2.0.4.0
Oracle Required Support Files 32 bit Patch 10.2.0.4.0
Platform. Required Support Files 10.2.0.4.0
Oracle Core Required Support Files Patch 10.2.0.4.0
Oracle Globalization Support Patch 10.2.0.4.0
Oracle Net Required Support Files Patch 10.2.0.4.0
SSL Required Support Files for InstantClient Patch 10.2.0.4.0
SQL*Plus Required Support Files Patch 10.2.0.4.0
RDBMS Required Support Files Patch 10.2.0.4.0
RDBMS Required Support Files for Instant Client Patch 10.2.0.4.0
Oracle RAC Required Support Files-HAS Patch 10.2.0.4.0
Precompiler Required Support Files Patch 10.2.0.4.0
LDAP Required Support Files Patch 10.2.0.4.0
DBJAVA Required Support Files Patch 10.2.0.4.0
Agent Required Support Files Patch 10.2.0.4.0
XDK Required Support Files Patch 10.2.0.4.0
Oracle Clusterware RDBMS Files Patch 10.2.0.4.0
Cluster Ready Services Files Patch 10.2.0.4.0
HAS Common Files Patch 10.2.0.4.0
Oracle Clusterware Patch 10.2.0.4.0
Oracle Notification Service Patch 10.2.0.4.0
-----------------------------------------------------------------------------
Instantiating scripts for add node (Wednesday, July 1, 2009 11:04:22 PM GMT+08:00)
. 1% Done.
Instantiation of add node scripts complete
Saving inventory on nodes (Wednesday, July 1, 2009 11:04:28 PM GMT+08:00)
. 100% Done.
Save inventory complete
WARNING:
The following configuration scripts need to be executed as the "root" user in each cluster node.
#!/bin/sh
#Root script. to run
/oracle/crs/product/app/install/rootaddnode.sh #On nodes sndb1_boot
/oracle/crs/product/app/root.sh #On nodes snzc3
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts in each cluster node
The Cluster Node Addition of /oracle/crs/product/app was successful.
Please check '/tmp/silentInstall.log' for more details.
[snzc3:/oracle/crs/product/app/oui/bin]$
将rootaddnode.sh脚本COPY到节点1上,执行完成。
在节点3上执行/oracle/crs/product/app/root.sh
[snzc3]cd /oracle/crs/product/app/opmn/conf
[snzc3:/oracle/crs/product/app/opmn/conf]cat ons.config | grep remoteport
[snzc3:/oracle/crs/product/app/bin]$./racgons add_config snzc3:6200
2、在节点1的/oracle/product/database/oui/bin/addNode.sh
执行完成后再节点3上执行root.sh
3、在节点3上执行DBCA,将实例SNDB3加到SNDB数据库中。
4、RAC数据库配置完成。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7882490/viewspace-608448/ ,如需转载,请注明出处,否则将追究法律责任。