Documente Academic
Documente Profesional
Documente Cultură
#######
# How to restore OCR and Voting disk after DiskGroup Corruption on Oracle 11g R2.
#########################################################
#######
--Location and status of OCR before starting the test:
root@host1:/u01/GRID/11.2/cdata # /u01/GRID/11.2/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version
:
3
Total space (kbytes)
:
262120
Used space (kbytes)
:
2744
Available space (kbytes) :
259376
ID
: 401168391
Device/File Name
: +OCRVOTING
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
2010/01/21 14:17:54
/u01/GRID/11.2/cdata/cluster01/backup00.ocr
host1
2010/01/21 05:58:31
/u01/GRID/11.2/cdata/cluster01/backup01.ocr
host1
2010/01/21 01:58:30
/u01/GRID/11.2/cdata/cluster01/backup02.ocr
host1
2010/01/20 05:58:21
/u01/GRID/11.2/cdata/cluster01/day.ocr
host1
2010/01/14 23:12:07
/u01/GRID/11.2/cdata/cluster01/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
NAME
PATH
------------------------------ -----------------------------------------------------------OCRVOTING_0000
/dev/oracle/asm.25.lun
OCRVOTING_0001
/dev/oracle/asm.26.lun
OCRVOTING_0002
/dev/oracle/asm.27.lun
OCRVOTING_0003
/dev/oracle/asm.28.lun
OCRVOTING_0004
/dev/oracle/asm.29.lun
5 rows selected.
count=1000
count=1000
count=1000
count=1000
count=1000
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2673:
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2793:
completed
CRS-4133:
--host2:
root@host2:/root # /u01/GRID/11.2/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on
'host2'
CRS-2673: Attempting to stop 'ora.crsd' on 'host2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'host2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'host2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'host2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'host2'
CRS-2673: Attempting to stop 'ora.OCRVOTING.dg' on 'host2'
CRS-2673: Attempting to stop 'ora.db.db' on 'host2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'host2'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'host2' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'host2'
CRS-2677: Stop of 'ora.scan2.vip' on 'host2' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'host1'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'host2' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'host2'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'host2' succeeded
CRS-2673: Attempting to stop 'ora.host2.vip' on 'host2'
CRS-2677: Stop of 'ora.scan3.vip' on 'host2' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'host1'
CRS-2677: Stop of 'ora.host2.vip' on 'host2' succeeded
CRS-2672: Attempting to start 'ora.host2.vip' on 'host1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'host2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'host2'
CRS-2677: Stop of 'ora.scan1.vip' on 'host2' succeeded
CRS-2676: Start of 'ora.scan2.vip' on 'host1' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'host1' succeeded
CRS-2676:
CRS-2677:
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2673:
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2792:
completed
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2673:
CRS-2673:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2677:
CRS-2673:
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2793:
completed
CRS-4133:
--host1
root@host1:/root # /u01/GRID/11.2/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
--host2
--CRS Alert log: (Start failed because the Diskgroup is not available)
2010-01-21 16:29:07.785
[cssd(10123)]CRS-1705:Found 0 configured voting files but 1 voting files are required,
terminating to ensure data integrity; details at (:CSSNM00065:) in
/u01/GRID/11.2/log/host1/cssd/ocssd.log
2010-01-21 16:29:07.785
[cssd(10123)]CRS-1603:CSSD on node host1 shutdown by user.
2010-01-21 16:29:07.918
[ohasd(9931)]CRS-2765:Resource 'ora.cssdmonitor' has failed on server 'host1'.
2010-01-21 16:30:05.489
[/u01/GRID/11.2/bin/orarootagent.bin(10113)]CRS-5818:Aborted command 'start for
resource: ora.diskmon 1 1' for resource 'ora.diskmon'. Details at (:CRSAGF00113:) in
/u01/GRID/11.2/log/host1/agent/ohasd/orarootagent_root/orarootagent_root.log.
2010-01-21 16:30:09.504
[ohasd(9931)]CRS-2757:Command 'Start' timed out waiting for response from the resource
'ora.diskmon'. Details at (:CRSPE00111:) in /u01/GRID/11.2/log/host1/ohasd/ohasd.log.
2010-01-21 16:30:20.687
[cssd(10622)]CRS-1713:CSSD daemon is started in clustered mode
2010-01-21 16:30:21.801
[cssd(10622)]CRS-1705:Found 0 configured voting files but 1 voting files are required,
terminating to ensure data integrity; details at (:CSSNM00065:) in
/u01/GRID/11.2/log/host1/cssd/ocssd.log
2010-01-21 16:30:21.801
[cssd(10622)]CRS-1603:CSSD on node host1 shutdown by user.
--host1 STOP CRS because due to Voting Disk unavailability is not running properly:
root@host1:/tmp # /u01/GRID/11.2/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on
'host1'
CRS-2673: Attempting to stop 'ora.crsd' on 'host1'
CRS-4548: Unable to connect to CRSD
CRS-2675: Stop of 'ora.crsd' on 'host1' failed
CRS-2679: Attempting to clean 'ora.crsd' on 'host1'
CRS-4548: Unable to connect to CRSD
CRS-2678: 'ora.crsd' on 'host1' has experienced an unrecoverable failure
CRS-0267: Human intervention required to resume its availability.
CRS-2795: Shutdown of Oracle High Availability Services-managed resources on 'host1' has
failed
CRS-4687: Shutdown command has completed with error(s).
CRS-4000: Command Stop failed, or completed with errors.
--Because all the processes are not STOPPING, disable the cluster AUTO Start and reboot
--the server for cleaning all the pending processes.
root@host1:/tmp # /u01/GRID/11.2/bin/crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
root@host1:/tmp # reboot
*.shared_pool_size=300M
--Create the Diskgroup Using SQLPLUS Create Diskgroup and save the ASM spfile inside:
create Diskgroup OCRVOTING high redundancy disk '/dev/oracle/asm.25.lun',
'/dev/oracle/asm.26.lun', '/dev/oracle/asm.27.lun',
'/dev/oracle/asm.28.lun', '/dev/oracle/asm.29.lun'
ATTRIBUTE 'compatible.asm'='11.2.0.0.0', 'compatible.rdbms'='11.2.0.0.0';
create spfile='+OCRVOTING' from pfile='/tmp/asm_pfile.ora';
File created.
SQL> shut immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 1069252608 bytes
Fixed Size
2154936 bytes
Variable Size
1041931848 bytes
ASM Cache
25165824 bytes
ASM diskgroups mounted
-- Restore OCR from backup:
root@host1:/root # /u01/GRID/11.2/bin/ocrconfig -restore
/u01/GRID/11.2/cdata/cluster01/backup00.ocr
--Check the OCR status after restore:
root@host1:/root # /u01/GRID/11.2/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version
:
3
Total space (kbytes)
:
262120
Used space (kbytes)
:
2712
Available space (kbytes) :
259408
ID
: 701409037
Device/File Name
: +OCRVOTING
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
CRS-2677:
CRS-2677:
CRS-2673:
CRS-2677:
CRS-2673:
CRS-2673:
CRS-2677:
CRS-2677:
CRS-2793:
completed
CRS-4133:
ora.gsd
OFFLINE OFFLINE
host1
OFFLINE OFFLINE
host2
ora.net1.network
ONLINE ONLINE
host1
ONLINE ONLINE
host2
ora.ons
ONLINE ONLINE
host1
ONLINE ONLINE
host2
-------------------------------------------------------------------------------Cluster Resources
-------------------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr
1
ONLINE ONLINE
host1
ora.LISTENER_SCAN2.lsnr
1
ONLINE ONLINE
host2
ora.LISTENER_SCAN3.lsnr
1
ONLINE ONLINE
host2
ora.db.db
1
ONLINE ONLINE
host1
Open
2
ONLINE ONLINE
host2
Open
ora.oc4j
1
OFFLINE OFFLINE
ora.scan1.vip
1
ONLINE ONLINE
host1
ora.scan2.vip
1
ONLINE ONLINE
host2
ora.scan3.vip
1
ONLINE ONLINE
host2
ora.host1.vip
1
ONLINE ONLINE
host1
ora.host2.vip
1
ONLINE ONLINE
host2