Today is. after a busy day, I finally have time to write something. Some time ago I wrote about how to recover from the existence of a backup in RAc ocr. Today I wrote about how to reconstruct ocr and olr without a backup?
The biggest tragedy is that the database is broken and the backup is gone. It reminds me of a popular saying in the past few years: "the biggest tragedy is that people are living and money is gone ". In short, backup is more important than everything.
Scenario introduction:
In the 11G ocr, the asm disk is accidentally deleted by the user and all backups are deleted by mistake. The olr is also damaged. So far, the tragedy has been repeated.
Recovery Process: (in fact, it is the process of rebuilding ocr using root. sh. After reconstruction, you may need to re-register related resources, such as listener or database instances !)
1. Clear the configuration information of all nodes in the cluster. (The rootcrs. sh script exists in the 11G. This script exists in $ GRID_HOME/crs/install by default ).
Note: This script must be executed under root; otherwise, an error message will be prompted.
[Grid @ rac-one install] $./rootcrs. pl
You must be logged in as root to run this script.
Log in as root and rerun this script.
2014-04-01 17: 08: 12: Not running as authorized user
Insufficient privileges to execute this script.
Root or administrative privileges needed to run the script.
For more information about the script function, see-help. Such as upgrade, rollback, and reconfiguration wait
[Root @ rac-two install] #./rootcrs. pl-help
Usage:
Rootcrs. pl [-verbose] [-upgrade [-force] |-patch]
[-Paramfile <parameter-file>]
[-Deconfig [-deinstall] [-keepdg] [-force] [-lastnode]
[-Downgrade-oldcrshome <old crshome path>-version <old crs version> [-force] [-lastnode]
[-Unlock [-crshome <path to crs home>] [-nocrsstop]
[-Init]
Options:
-Verbose Run this script in verbose mode
-Upgrade Oracle HA is being upgraded from previous version
-Patch Oracle HA is being upgraded to a patch version
-Paramfile Complete path of file specifying HA parameter values
-Lastnode Force the node this script is executing on to be considered
As the last node of deconfiguration or downgrade, and perform
Actions associated with demo-ing or downgrading
Last node
-Downgrade Downgrade the clusterware
-Version For use with downgrade; special handling is required if
Downgrading to 9i. This is the old crs version in the format
A. B .C.D. E (e. g 11.1.0.6.0 ).
-Deconfig Remove Oracle Clusterware to allow it to be uninstalled or reinstalled
-Force Force the execution of steps in delete or dwongrade that cannot
Be verified to be safe
-Deinstall Reset the permissions on CRS home during de-configuration
-Keepdg Keep existing diskgroups during de-configuration
-Unlock Unlock CRS home
-Crshome Complete path of crs home. Use with unlock option
-Oldcrshome For use with downgrade. Complete path of the old crs home
-Nocrsstop used with unlock option to reset permissions on an inactive grid home
-Init Reset the permissions of all files and directories under CRS home
If neither-upgrade nor-patch is supplied, a new install is already med
To see the full manpage for this program, execute:
Perldoc rootcrs. pl
[Root @ rac-two install] #
Clear all node cluster information under root:
Node 2:
[Grid @ rac-one install] $ su
Password:
[Root @ rac-one install] #./rootcrs. pl-deconfig-force
Using configuration parameter file:./crsconfig_params
Network exists: 1/192. 168.4.0/255.255.255.0/eth0, type static
VIP exists:/rac-one-vip/192.168.4.113/192.168.4.0/255.255.255.0/eth0, hosting node rac-one
VIP exists:/rac-two-vip/192.168.4.114/192.168.4.0/255.255.255.0/eth0, hosting node rac-two
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora. registry. acfs 'on 'rac-one'
CRS-2677: Stop of 'ora. registry. acfs 'on 'rac-one' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-one'
CRS-2673: Attempting to stop 'ora. crsd' on 'rac-one'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac-one'
CRS-2673: Attempting to stop 'ora. c1' on 'rac-one'
CRS-2673: Attempting to stop 'ora. GIDG. dg 'on 'rac-one'
CRS-2673: Attempting to stop 'ora. DATADG. dg 'on 'rac-one'
CRS-2677: Stop of 'ora. DATADG. dg 'on 'rac-one' succeeded
CRS-2677: Stop of 'ora. GIDG. dg 'on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora. asm 'on 'rac-one'
CRS-2677: Stop of 'ora. * 'on 'rac-one' succeeded
CRS-2672: Attempting to start 'ora. c1' on 'rac-two'
CRS-2677: Stop of 'ora. asm 'on 'rac-one' succeeded
CRS-2676: Start of 'ora. brax' on 'rac-two' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac-one' has completed
CRS-2677: Stop of 'ora. crsd' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora. crf' on 'rac-one'
CRS-2673: Attempting to stop 'ora. ctssd 'on 'rac-one'
CRS-2673: Attempting to stop 'ora. evmd 'on 'rac-one'
CRS-2673: Attempting to stop 'ora. asm 'on 'rac-one'
CRS-2673: Attempting to stop 'ora. drivers. acfs 'on 'rac-one'
CRS-2673: Attempting to stop 'ora. mdnsd' on 'rac-one'
CRS-2677: Stop of 'ora. crf' on 'rac-one 'succeeded
CRS-2677: Stop of 'ora. evmd 'on 'rac-one' succeeded
CRS-2677: Stop of 'ora. mdnsd' on 'rac-one' succeeded
CRS-2677: Stop of 'ora. ctssd 'on 'rac-one' succeeded
CRS-2677: Stop of 'ora. asm 'on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora. cluster_interconnect.haip 'on 'rac-one'
CRS-2677: Stop of 'ora. cluster_interconnect.haip 'on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.css d' on 'rac-one'
CRS-2677: Stop of 'ora.css d' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora. gipcd 'on 'rac-one'
CRS-2677: Stop of 'ora. drivers. acfs 'on 'rac-one' succeeded
CRS-2677: Stop of 'ora. gipcd' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora. gpnpd 'on 'rac-one'
CRS-2677: Stop of 'ora. gpnpd 'on 'rac-one' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-one' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[Root @ rac-one install] #
Node 1. Because my RAC is dual-node, the lastnode parameter is used to clear the last one:
[Grid @ rac-two crs] $ cd install/
[Grid @ rac-two install] $ su
Password:
[Root @ rac-two install] #./rootcrs. pl-deconfig-force-lastnode
Using configuration parameter file:./crsconfig_params
CRS resources for listeners are still configured
Network exists: 1/192. 168.4.0/255.255.255.0/eth0, type static
VIP exists:/rac-two-vip/192.168.4.114/192.168.4.0/255.255.255.0/eth0, hosting node rac-two
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora. registry. acfs 'on 'rac-two'
CRS-2677: Stop of 'ora. registry. acfs 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. crsd' on 'rac-two'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac-two'
CRS-2673: Attempting to stop 'ora. c1' on 'rac-two'
CRS-2673: Attempting to stop 'ora. GIDG. dg 'on 'rac-two'
CRS-2673: Attempting to stop 'ora. DATADG. dg 'on 'rac-two'
CRS-2677: Stop of 'ora. DATADG. dg 'on 'rac-two' succeeded
CRS-2677: Stop of 'ora. brax' on 'rac-two' succeeded
CRS-2677: Stop of 'ora. GIDG. dg 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. asm 'on 'rac-two'
CRS-2677: Stop of 'ora. asm 'on 'rac-two' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac-two' has completed
CRS-2677: Stop of 'ora. crsd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. ctssd 'on 'rac-two'
CRS-2673: Attempting to stop 'ora. evmd 'on 'rac-two'
CRS-2673: Attempting to stop 'ora. asm 'on 'rac-two'
CRS-2677: Stop of 'ora. evmd 'on 'rac-two' succeeded
CRS-2677: Stop of 'ora. asm 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. cluster_interconnect.haip 'on 'rac-two'
CRS-2677: Stop of 'ora. cluster_interconnect.haip 'on 'rac-two' succeeded
CRS-2677: Stop of 'ora. ctssd 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.css d' on 'rac-two'
CRS-2677: Stop of 'ora.css d' on 'rac-two' succeeded
CRS-2672: Attempting to start 'ora.css dmonitor 'on 'rac-two'
CRS-2676: Start of 'ora.css dmonitor 'on 'rac-two' succeeded
CRS-2672: Attempting to start 'ora.css d' on 'rac-two'
CRS-2672: Attempting to start 'ora. diskmon 'on 'rac-two'
CRS-2676: Start of 'ora. diskmon' on 'rac-two' succeeded
CRS-2676: Start of 'ora.css d' on 'rac-two' succeeded
CRS-4611: Successful deletion of voting disk + GIDG.
ASM de-configuration Tracing file location:/tmp/asmcadc_clean2014-04-01_05-14-52-PM.log
ASM Clean Configuration START
ASM Clean Configuration END
ASM with SID + ASM1 deleted successfully. Check/tmp/asmcadc_clean2014-04-01_05-14-52-PM.log for details.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-two'
CRS-2673: Attempting to stop 'ora. mdnsd' on 'rac-two'
CRS-2673: Attempting to stop 'ora. ctssd 'on 'rac-two'
CRS-2673: Attempting to stop 'ora. asm 'on 'rac-two'
CRS-2677: Stop of 'ora. mdnsd' on 'rac-two' succeeded
CRS-2677: Stop of 'ora. ctssd 'on 'rac-two' succeeded
CRS-2677: Stop of 'ora. asm 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. cluster_interconnect.haip 'on 'rac-two'
CRS-2677: Stop of 'ora. cluster_interconnect.haip 'on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.css d' on 'rac-two'
CRS-2677: Stop of 'ora.css d' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. crf' on 'rac-two'
CRS-2677: Stop of 'ora. crf' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. gipcd 'on 'rac-two'
CRS-2677: Stop of 'ora. gipcd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora. gpnpd 'on 'rac-two'
CRS-2677: Stop of 'ora. gpnpd 'on 'rac-two' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-two' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[Root @ rac-two install] #