Showing posts with label ocr. Show all posts
Showing posts with label ocr. Show all posts

Sunday, February 14, 2016

Restoring OCR and Vote Disks on Block Devices in a 11gR2 Cluster (11.2.0.4)

Using block or raw devices for OCR and vote disks is not supported for new installation of 11.2. However it is supported for upgraded systems. Following is from the Oracle clusterware admin guide "Oracle Universal Installer for Oracle Clusterware 11g release 2 (11.2), does not support the use of raw or block devices. However, if you upgrade from a previous Oracle Clusterware release, then you can continue to use raw or block devices. Oracle recommends that you use Oracle ASM to store OCR and voting disks." On 12c block devices are not supported at all and ocr and vote disks must be moved to ASM before the upgrade.
However if chosen the ocr and vote disks can remain in block devices such as after upgrade from 11.1.0.7 to 11.2.0.4 (or 11.2.0.3). In 10g and 11gR1 clusters the vote disk was backed up using dd command. However this is not supported on 11.2. Following is from the clusterware admin guide "The dd commands used to back up and recover voting disks in previous versions of Oracle Clusterware are not supported in Oracle Clusterware 11g release 2 (11.2). Restoring voting disks that were copied using dd or cp commands can prevent the Oracle Clusterware 11g release 2 (11.2) stack from coming up." On 11.2 vote disks are not needed to be backed up separately. From clusterware admin "In Oracle Clusterware 11g release 2 (11.2), you no longer have to back up the voting disk. The voting disk data is automatically backed up in OCR as part of any configuration change and is automatically restored to any voting disk added."
So only the OCR is needed to be backed up and this could be used to restore both ocr and vote disk. This post shows steps for restoring OCR and vote disks that are stored on block devices (after all of the ocr and vote disks have failed or corrupted). The environment used for this is a 11.2.0.4 two node cluster which was previously upgraded from 11.1.0.7.
Two OCR files are
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     292924
         Used space (kbytes)      :       6452
         Available space (kbytes) :     286472
         ID                       :  675013742
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded

         Logical corruption check succeeded
and the vote disks
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6cc871618b1e5f9fbf795315f36b3c21 (/dev/sdh1) []
 2. ONLINE   8f988bcfda0b5fe0bf783f44e81d3f66 (/dev/sdf1) []
 3. ONLINE   6af6320f0979dff7bf6fa474cea2765a (/dev/sdg1) []
OCR and vote disks all were corrupted with dd command
 for i in /dev/sdb1 /dev/sde1 /dev/sdh1 /dev/sdg1 /dev/sdf1
> do
> dd if=/dev/zero of=$i bs=8192 count=1000
> done
This results in OCR and vote disks becoming unusable. Below output shows vote disk state pending offline
crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. PENDOFFL 6cc871618b1e5f9fbf795315f36b3c21 (/dev/sdh1) []
 2. PENDOFFL 8f988bcfda0b5fe0bf783f44e81d3f66 (/dev/sdf1) []
 3. PENDOFFL 6af6320f0979dff7bf6fa474cea2765a (/dev/sdg1) []
Following message could be observed on ocssd.log
2016-01-15 17:08:16.921: [    CSSD][3422501184]clssnmvVoteDiskValidation: Voting disk /dev/sdh1 is corrupted
2016-01-15 17:08:16.921: [    CSSD][3422501184]clssnmvWorkerThread: disk /dev/sdh1 corrupted
2016-01-15 17:08:16.921: [    CSSD][3422501184]clssnmvDiskAvailabilityChange: voting file /dev/sdh1 now offline
2016-01-15 17:08:17.405: [   SKGFD][3419347264]Lib :UFS:: closing handle 0x85937a0 for disk :/dev/sdh1:

2016-01-15 17:08:20.746: [    CSSD][3412990272]clssnmvVoteDiskValidation: Voting disk /dev/sdg1 is corrupted
2016-01-15 17:08:20.746: [    CSSD][3412990272]clssnmvWorkerThread: disk /dev/sdg1 corrupted
2016-01-15 17:08:20.746: [    CSSD][3412990272]clssnmvDiskAvailabilityChange: voting file /dev/sdg1 now offline
2016-01-15 17:08:20.901: [   SKGFD][3422501184]Lib :UFS:: closing handle 0x86afd90 for disk :/dev/sdh1:
Eventually the two nodes got rebooted after which the OCR and vote disk restore process began.
Stop clusterware on all nodes with -f option.
# crsctl stop crs -f
At times this could take a while. Quickest option was to disable crs and reboot the nodes. Once nodes starts enable crs again but do not start the cluster stack.



When clusterware stack is down on all nodes, start it only on a single node with exclusive and nocrs options.
crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
If crsd process is running stop it.
crsctl stop resource ora.crsd -init
Restore the OCR with a backup
#ocrconfig -restore /opt/app/11.2.0/grid/cdata/cg_11g_cluster/backup_20160115_170721.ocr
# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     292924
         Used space (kbytes)      :       6452
         Available space (kbytes) :     286472
         ID                       :  675013742
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

         Logical corruption check succeeded
As seen from the ocrcheck output the ocr files were restored to the original location listed on the ocr.loc file.
At this stage the vote disks are still not listed.
crsctl query css votedisk
Located 0 voting disk(s).
To restore the vote disks run add votedisk specifying the block device locations (replace votedisk is not applicable for non-ASM locations).
# crsctl add css  votedisk /dev/sdh1 /dev/sdg1 /dev/sdf1
Now formatting voting disk: /dev/sdh1.
Now formatting voting disk: /dev/sdg1.
Now formatting voting disk: /dev/sdf1.
CRS-4603: Successful addition of voting disk /dev/sdh1.
CRS-4603: Successful addition of voting disk /dev/sdg1.
CRS-4603: Successful addition of voting disk /dev/sdf1.
[root@rac1 oracle]# crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   274a68a133e84f65bf3b7b7e966f3862 (/dev/sdh1) []
 2. ONLINE   b0615b1176ef4f12bfdd34c115620249 (/dev/sdg1) []
 3. ONLINE   b1eb954b7a454f32bf0c54f252776c1d (/dev/sdf1) []
Stop the clusterware stack on this node
 crsctl stop crs -f
and start the clusteware stack on all nodes
crsctl start crs -nowait
This concludes steps for restoring OCR and vote disk on a 11.2.0.4 cluster when they are stored on block devices.

Useful Metalink note
How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062983.1]
Bug 12543757 : UNABLE TO MOVE VOTING DISK FROM RAW DEVICES TO NFS

Related Posts
Restoring OCR due to ASM disk failures - 1
Restoring OCR due to ASM disk failures - 2
Restoring Vote disk due to ASM disk failures - 1
Restoring Vote disk due to ASM disk failures - 2
Restoring Vote disk due to ASM disk failures - 3
Restoring OCR & Vote disk due to ASM disk failures - 1
Restoring OCR & Vote disk due to ASM disk failures - 2
Restoring OCR & Vote disk due to ASM disk failures - 3

Monday, March 18, 2013

Moving 11gR2 RAC to New Set of ASM Diskgroups

This post is for a situation that require moving the RAC components from current set of ASM disk groups to new set of ASM disk group. Situation could arise in the form of moving to higher redundancy disk group than current ASM disk group redundancy or migrating to a new SAN. The steps required to move are actually a collection of previous posts and will be referenced throughout. The post uses setup created with11gR2 RAC installation on RHEL6.
The current setup has 3 ASM diskgroups CLUSTER_DG (Quorum disk group), DATA and FLASH. The new diskgroups are named NEWCLUSTERDG, NEWDATA and NEWFLASH. If the asm_diskstring is different for example if old asm_diskstring is /dev/emcpower* and new asm_diskstring is /dev/mapper/mpath* then asm_diskstring must be edited to include both (old and new) asm_diskstring until all relevant files are moved out of the old set of ASM diskgroup. Once completed asm_diskstring could be edited to include only the currently valid set of disks. If ASMLib is used then this step could be omitted as asm_diskstring would not change (ORCL:* for all). This step is not shown and it is assumed that ASM disk groups could be created without any issue.
The main steps include
1. Moving cluster related files that are in ASM to new ASM diskgroup
2. Moving database related files to new ASM diskgroup

1. Moving cluster related files that are in ASM to new ASM diskgroup
This could be further itemized as follows
1.1. Moving OCR to new ASM diskgroup
1.2. Moving Vote disks to new ASM diskgroup
1.3. Moving server side ASM SPfile to new ASM diskgroup
Same diskgroup will be used for all these files types (OCR,Vote and ASM SPfile) and this disk group is created with a quorum disk.
create diskgroup newclusterdg quorum 
failgroup fail1 disk '/dev/sdg1' 
failgroup fail2 disk '/dev/sdh1' 
failgroup fail3 disk '/dev/sdi1' 
attribute 'compatible.asm'='11.2';

SQL> select name,state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
CLUSTER_DG                     MOUNTED
DATA                           MOUNTED
FLASH                          MOUNTED
NEWCLUSTERDG                   MOUNTED   <-- used for moving the cluster files
Once created the diskgroup is only mounted on the node it's created.
crsctl status resource ora.NEWCLUSTERDG.dg
NAME=ora.NEWCLUSTERDG.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE           , OFFLINE
STATE=ONLINE on rhel6m1, OFFLINE
It must be mounted on other nodes as well before continuing with the cluster file moving. Run the following on each node to mount the new diskgroup
 alter diskgroup NEWCLUSTERDG mount;
or mount it accross the cluster with
# crsctl start resource ora.NEWCLUSTERDG.dg
CRS-2672: Attempting to start 'ora.NEWCLUSTERDG.dg' on 'rhel6m2'
CRS-2676: Start of 'ora.NEWCLUSTERDG.dg' on 'rhel6m2' succeeded

crsctl status resource ora.NEWCLUSTERDG.dg
NAME=ora.NEWCLUSTERDG.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE           , ONLINE
STATE=ONLINE on rhel6m1, ONLINE on rhel6m2
or by instance using srvctl
srvctl start diskgroup  -g newclusterdg -n rhel6m2

srvctl status diskgroup  -g newclusterdg -n "rhel6m1,rhel6m2" -a
Disk Group data is running on rhel6m1,rhel6m2
Disk Group data is enabled on rhel6m1,rhel6m2

1.1. Moving OCR to new ASM diskgroup
OCR could be moved to new ASM disk either using the add/delete method or replace option. However when there's only one OCR file (no OCR mirror) then replace option cannot be used. OCR add/delete must be run as root.
ocrcheck  (# current configuration)
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3328
         Available space (kbytes) :     258792
         ID                       : 1487892601
         Device/File Name         : +CLUSTER_DG
                                    Device/File integrity check succeeded

# ocrconfig -replace +CLUSTER_DG -replacement +NEWCLUSTERDG
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
First the new ASM diskgroup must be added and this will appear as the OCRMirror. Afterwards OCR location in the old diskgroup is removed (this will make the ocrmirror to become the ocr).
# ocrconfig -add +NEWCLUSTERDG

# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3344
         Available space (kbytes) :     258776
         ID                       : 1487892601
         Device/File Name         : +CLUSTER_DG
                                    Device/File integrity check succeeded
         Device/File Name         : +NEWCLUSTERDG
                                    Device/File integrity check succeeded


# ocrconfig -delete +CLUSTER_DG

# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3344
         Available space (kbytes) :     258776
         ID                       : 1487892601
         Device/File Name         : +NEWCLUSTERDG
                                    Device/File integrity check succeeded
This concludes the moving of OCR to new ASM diskgroup.
Related Post: Migrating OCR to ASM in 11gR2 Clusterware
Related metalink note : OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]

1.2. Moving Vote disks to new ASM diskgroup
The vote disk could be moved with the replace option using crsctl. Unlike previous versions (10.2, 11.1) in 11.2 the vote disk replace could be run as grid user. Current vote disk configuration
$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   2c90c4f4a0fb4faebfb264244a836b96 (/dev/sdb1) [CLUSTER_DG]
 2. ONLINE   1d7890a346284fa4bf0e278b2f3b1d3d (/dev/sdc1) [CLUSTER_DG]
 3. ONLINE   433f41571bf44fcebfe636a97d94777a (/dev/sdd1) [CLUSTER_DG]
Located 3 voting disk(s).
Run replace command
$ crsctl replace votedisk +NEWCLUSTERDG
Successful addition of voting disk 58e2e7ab4cdc4fc1bf98b745437a5082.
Successful addition of voting disk 1fb2f493ec644ffdbfaca24bbbf41864.
Successful addition of voting disk 74048ba14f1b4f8dbf677abb76f929c1.
Successful deletion of voting disk 2c90c4f4a0fb4faebfb264244a836b96.
Successful deletion of voting disk 1d7890a346284fa4bf0e278b2f3b1d3d.
Successful deletion of voting disk 433f41571bf44fcebfe636a97d94777a.
Successfully replaced voting disk group with +NEWCLUSTERDG.
CRS-4266: Voting file(s) successfully replaced
New vote disk configuration
$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   58e2e7ab4cdc4fc1bf98b745437a5082 (/dev/sdg1) [NEWCLUSTERDG]
 2. ONLINE   1fb2f493ec644ffdbfaca24bbbf41864 (/dev/sdh1) [NEWCLUSTERDG]
 3. ONLINE   74048ba14f1b4f8dbf677abb76f929c1 (/dev/sdi1) [NEWCLUSTERDG]
Located 3 voting disk(s).
That concludes the moving of vote disk to new ASM diskgroup
Related Post: Migrating Voting Disk to ASM in 11gR2 Clusterware
Related metalink note : OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]

1.3. Moving server side ASM SPfile to new ASM diskgroup
In 11gR2 RAC and Standalone (Restart) the ASM SPfile reside in the ASM disk group itself. Current location of the ASM Spfile could be obtained in number of ways. Show parameter command (running it on ASM instance)
SQL> show parameter spfile;

NAME      TYPE        VALUE
--------- ----------- ------------------------------------------------------------------
spfile    string      +CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
It's also visible in the ASM alert log
Machine:        x86_64
Using parameter settings in server-side spfile +CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
System parameters with non-default values
and with spget on ASMCMD
ASMCMD> spget
+CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
To move the ASM SPfile to new ASM diskgroup create ASM pfile from the current spfile
SQL> create pfile='/home/grid/asmpfile.ora' from spfile;
Create ASM SPfile in the new ASM diskgroup location using the earlier created pfile
SQL> create spfile='+newclusterdg' from pfile='/home/grid/asmpfile.ora';
New SPfile location will be logged on the ASM alert log
NOTE: updated gpnp profile ASM SPFILE to +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
This commands update the gpnp profile and during the next restart ASM will use the new SPFile. This could be verified using the ASM alert log or asmcmd spget command. To explicitly set the SPFile location use ASMCMD's spset command (this step is not necessary)
ASMCMD> spset +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
Using parameter settings in server-side spfile +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
This concludes the moving of ASM SPfile to new ASM diskgroup
Related metalink note : How to move ASM spfile to a different disk group [ID 1082943.1]

The ASM diskgroup that stores cluster files could be dropped now. However since copies of various files (OCR, ASMSPfile) still reside in it trying to drop without content clause would throw an error
SQL> drop diskgroup cluster_dg;
drop diskgroup cluster_dg
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "CLUSTER_DG" contains existing files
It is also important that before dropping the diskgroup is dismounted from all other ASM instances in the cluster, if not an error will be thrown
SQL> drop diskgroup cluster_dg including contents;
drop diskgroup cluster_dg including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup CLUSTER_DG is mounted by another ASM instance

SQL> alter diskgroup cluster_dg dismount;  <-- run on all ASM instances except one
At times trying to dismount could throw the following error
SQL> alter diskgroup newclusterdg dismount;
alter diskgroup newclusterdg dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "CLUSTER_DG" precludes its dismount
This could be due to file reference still opened even though they are not used. In such cases restart of OHAS on the nodes where dismount fails could resolve this issue.
Once dismounted drop the ASM diskgroup.
SQL> drop diskgroup cluster_dg including contents;
Diskgroup dropped.


2. Moving database related files to new ASM diskgroup

This step could be further itemized as
2.1. Moving control files to new ASM diskgroup
2.2. Moving SPfile to new ASM diskgroup
2.3. Moving data files to new ASM diskgroup
2.4. Moving temp files to new ASM diskgroup
2.5. Moving online redo log files to new ASM diskgroup
2.6. Moving backup files to new ASM diskgroup
Create new disk groups used for data files and fast recovery area and mount them across all the ASM instances
SQL> create diskgroup newdata external redundancy disk '/dev/sdj1';
Diskgroup created.

SQL> create diskgroup newflash external redundancy disk '/dev/sdk1';
Diskgroup created.

SQL> alter diskgroup newdata mount;
Diskgroup altered.

SQL> alter diskgroup newflash mount;
Diskgroup altered.
Metalink note How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1] shows how to move a database from one diskgroup to another using backup database as copy. This is also a valid option to move the database from asm-to-asm. In this post steps are shown to move each individual file type related to the database from one asm disk to another.

2.1. Moving control files to new ASM diskgroup
Currently the system has two control files in two diskgroups
SQL> show parameter control

NAME          TYPE   VALUE
------------- ------ ------------------------------
control_files string +DATA/std11g2/controlfile/current.256.785694741,
                     +FLASH/std11g2/controlfile/current.256.785694743
Before cloning the control files create a pfile from the current SPFile. This pfile will also be used for moving the SPFile as well.
SQL> create pfile='/home/oracle/pfile.ora' from spfile;
File created.
Update the control file locations on the SPFile by specifying the new ASM diskgroups.
SQL> alter system set control_files='+NEWDATA','+NEWFLASH' scope=spfile sid='*';
System altered.
Stop the database and start one instance in nomount mode.
srvctl stop database -d std11g2
srvctl start instance -d std11g2 -i std11g22 -o nomount
Restore control files to new location using the current control file.
rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 30 16:56:16 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: STD11G2 (not mounted)

RMAN> restore controlfile from '+DATA/std11g2/controlfile/current.256.785694741';

Starting restore at 30-JAN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=141 instance=std11g22 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+NEWDATA/std11g2/controlfile/current.256.806086607
output file name=+NEWFLASH/std11g2/controlfile/current.256.806086609
Finished restore at 30-JAN-13
Mount and open the database and verify the new control file locations
SQL> alter database mount;
Database altered.

SQL> alter database open;
Database altered.


SQL> show parameter control

NAME          TYPE   VALUE
------------- ------ ------------------------------
control_files string +NEWDATA/std11g2/controlfile/current.256.806086607,
                     +NEWFLASH/std11g2/controlfile/current.256.806086609
This concludes the moving of control files to new ASM disk groups.
Related Post : Cloning/Duplicating controlfile between ASM diskgroups
Related metalink note : How to duplicate a controlfile when ASM is involved [ID 345180.1]
Useful metalink note : How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1]

2.2. Moving SPfile to new ASM diskgroup
If the earlier created pfile is used for creating the spfile in this section modify the control_files parameter value in the pfile to reflect the new locations, otherwise create a new pfile from the spfile which will have the new control files location. Create a spfile in the new asm disk using the pfile (again it's important that control file locations reflect the new values. Modify pfile before creating spfile)
SQL> create spfile='+newdata' FROM PFILE='/home/oracle/pfile.ora';
File created.
Replacing the SPFile involves creating a alias to new spfile and updating the database configuration. Loging to ASM using ASMCMD (as grid user) and create the spfile alias
ASMCMD> mkalias +NEWDATA/STD11G2/PARAMETERFILE/spfile.257.806088197 spfilestd11g2.ora
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 Y    PARAMETERFILE/
                                                 N    spfilestd11g2.ora => +NEWDATA/STD11G2/PARAMETERFILE/spfile.257.806088197

srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/std11g2/spfilestd11g2.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: std11g2
Database instances: std11g21,std11g22
Disk Groups: DATA,FLASH,NEWDATA,NEWFLASH
Mount point paths:
Services: myservice
Type: RAC
Database is administrator managed

$ srvctl modify database -d std11g2 -p +NEWDATA/std11g2/spfilestd11g2.ora

$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +NEWDATA/std11g2/spfilestd11g2.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: std11g2
Database instances: std11g21,std11g22
Disk Groups: DATA,FLASH,NEWDATA,NEWFLASH
Mount point paths:
Services: myservice
Type: RAC
Database is administrator managed
Modify the pfiles that give reference to the SPFile in $ORACLE_HOME/dbs
cat /opt/app/oracle/product/11.2.0/dbhome_1/dbs/initstd11g22.ora

SPFILE='+NEWDATA/std11g2/spfilestd11g2.ora'
Restart the database and SPFile parameter will reflect the new SPFile location.
SQL> show parameter spfile

NAME     TYPE         VALUE 
-------- -----------  --------------------------------
spfile    string      +DATA/std11g2/spfilestd11g2.ora
After DB restart
SQL> show parameter spfile

NAME     TYPE         VALUE 
-------- -----------  --------------------------------
spfile    string      +NEWDATA/std11g2/spfilestd11g2.ora
This concludes the moving of SPFile to new ASM diskgroup.
Related Post : Replacing spfile in ASM
Related Post : Oracle 11gR2 RAC SPfile Issue

2.3. Moving data files to new ASM diskgroup
Moving data files from one ASM disk group to another involves creating a backup of the data file as a copy in the new asm diskgroup and switching to the data file copy. Following SQL could be used to generate the backup as copy rman commands for all the data files
SQL> select 'backup as copy datafile '||file#||' format ''+NEWDATA'';' from v$datafile;
Run a RMAN session using the commands generated above (output is truncated)
RMAN> run{
2> backup as copy datafile 1 format '+NEWDATA';
3> backup as copy datafile 2 format '+NEWDATA';
4> backup as copy datafile 3 format '+NEWDATA';
5> backup as copy datafile 4 format '+NEWDATA';
6> backup as copy datafile 5 format '+NEWDATA';
7> backup as copy datafile 6 format '+NEWDATA';
8> backup as copy datafile 7 format '+NEWDATA';
9> }

Starting backup at 31-JAN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 instance=std11g21 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/std11g2/datafile/system.259.785694749
output file name=+NEWDATA/std11g2/datafile/system.258.806151043 tag=TAG20130131T105042 RECID=2 STAMP=806151061
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26
Finished backup at 31-JAN-13
...
...
Shutdown all database instances and start one instance in mount mode
srvctl stop database -d std11g2
srvctl start instance -d std11g2 -i std11g21 -o mount
Use this instance to run the switch to copy command. Following SQL could be used to generate the switch command for all the data files
SQL> select 'switch datafile '||file#||' to copy;' from v$datafile;
Run the switch command from a RMAN session (output is truncated)
switch datafile 1 to copy;
switch datafile 2 to copy;
switch datafile 3 to copy;
switch datafile 4 to copy;
switch datafile 5 to copy;
switch datafile 6 to copy;
switch datafile 7 to copy;

RMAN>datafile 1 switched to datafile copy "+NEWDATA/std11g2/datafile/system.258.806151043"

RMAN>datafile 2 switched to datafile copy "+NEWDATA/std11g2/datafile/sysaux.259.806151073"
...
...
Recover each datafile. Following SQL could be used to generate the recover commands
select 'recover datafile '||file#||';' from v$datafile;
Run a RMAN session to recover the datafiles (output is truncated)
recover datafile 1;
recover datafile 2;
recover datafile 3;
recover datafile 4;
recover datafile 5;
recover datafile 6;
recover datafile 7;

RMAN>
Starting recover at 31-JAN-13
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 31-JAN-13
...
...
Once the recovery is completed open the database and bring up the other instances
SQL> alter database open;
Take a full backup of the database and delete the data file copies
RMAN> delete datafilecopy all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 instance=std11g21 device type=DISK
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time
------- ---- - --------------- ---------- ---------------
9       1    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/system.259.785694749

10      2    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/sysaux.260.785694765

11      3    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/undotbs1.261.785694779

12      4    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/undotbs2.263.785694797

13      5    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/users.264.785694801

14      6    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/example.268.785857285

15      7    A 31-JAN-13       36408130   31-JAN-13
        Name: +DATA/std11g2/datafile/test.269.785857289


Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=+DATA/std11g2/datafile/system.259.785694749 RECID=9 STAMP=806151523
deleted datafile copy
datafile copy file name=+DATA/std11g2/datafile/sysaux.260.785694765 RECID=10 STAMP=806151524
deleted datafile copy
...
...
This concludes the moving of data files to new ASM diskgroup.
Related Post : Moving Datafiles Between ASM Disk Groups
Related Post : Moving Datafiles to new location
Useful metalink note : How to move a datafile from ASM to the file system [ID 390416.1]

2.4. Moving temp files to new ASM diskgroup
To move the temp file, add a new temp file to the temporary tablespace by giving the new asm diskgroup as the location. Once the new temp file is in place remove the existing temp file.
SQL> alter tablespace temp add tempfile '+newdata(tempfile)';
Tablespace altered.

SQL> alter tablespace temp drop tempfile '+DATA/std11g2/tempfile/temp.262.785694783';
Tablespace altered.
This concludes the moving of temp file to new asm diskgroup.

2.5. Moving online redo log files to new ASM diskgroup
Moving online diskgroups could be done in two ways. One is to drop the current online redo log groups and add new online redo log groups in the new disks groups. Second option is to add new log files with new ASM diskgroup locations into the existing diskgroups and then removing log files that reside in the current (about to be removed) location. The second option is shown below. Current log files
SQL> select group#,member from v$logfile;

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +DATA/std11g2/onlinelog/group_1.257.785694743
         1 +FLASH/std11g2/onlinelog/group_1.257.785694745
         2 +DATA/std11g2/onlinelog/group_2.258.785694747
         2 +FLASH/std11g2/onlinelog/group_2.258.785694747
         3 +DATA/std11g2/onlinelog/group_3.265.785696921
         3 +FLASH/std11g2/onlinelog/group_3.259.785696923
         4 +DATA/std11g2/onlinelog/group_4.266.785696925
         4 +FLASH/std11g2/onlinelog/group_4.260.785696927
Add log file members using the new ASM diskgroups
SQL> alter database add logfile member '+newdata','+newflash' to group 1;

SQL> select group#,member from v$logfile order by 1;

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +DATA/std11g2/onlinelog/group_1.257.785694743
         1 +FLASH/std11g2/onlinelog/group_1.257.785694745
         1 +NEWDATA/std11g2/onlinelog/group_1.266.806152613
         1 +NEWFLASH/std11g2/onlinelog/group_1.257.806152615
         2 +FLASH/std11g2/onlinelog/group_2.258.785694747
         2 +DATA/std11g2/onlinelog/group_2.258.785694747
         3 +DATA/std11g2/onlinelog/group_3.265.785696921
         3 +FLASH/std11g2/onlinelog/group_3.259.785696923
         4 +FLASH/std11g2/onlinelog/group_4.260.785696927
         4 +DATA/std11g2/onlinelog/group_4.266.785696925
Group 1 now has 4 log files. Add log files to all other groups as well. Switch through all the groups so that newly created log files members also get written to by executing "archive current logs"
SQL> alter system archive log current;
This has to be done until all the log files groups have done a switch and an archive. If not trying to remove the second log file member will result in an error.
SQL> alter database drop logfile member '+DATA/std11g2/onlinelog/group_1.257.785694743';
Database altered.   <--- first member removed without an issue

SQL> alter database drop logfile member '+FLASH/std11g2/onlinelog/group_1.257.785694745';
alter database drop logfile member '+FLASH/std11g2/onlinelog/group_1.257.785694745' <--- trying remove second member gives an error.
*
ERROR at line 1:
ORA-00362: member is required to form a valid logfile in group 1
ORA-01517: log member: '+FLASH/std11g2/onlinelog/group_1.257.785694745'
This is because newly added log files are missing the redo records of the existing log files. If both of them were dropped prior to archive recovery will not find required redo records therefore a full log switch must be performed for all the log file groups before issuing the drop redo command. Once removed only redo log files with the new location will remain
SQL> select group#,member from v$logfile order by 1;

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +NEWFLASH/std11g2/onlinelog/group_1.257.806152615
         1 +NEWDATA/std11g2/onlinelog/group_1.266.806152613
         2 +NEWFLASH/std11g2/onlinelog/group_2.258.806152855
         2 +NEWDATA/std11g2/onlinelog/group_2.267.806152853
         3 +NEWDATA/std11g2/onlinelog/group_3.268.806152859
         3 +NEWFLASH/std11g2/onlinelog/group_3.259.806152859
         4 +NEWDATA/std11g2/onlinelog/group_4.269.806152863
         4 +NEWFLASH/std11g2/onlinelog/group_4.260.806152863
This concludes the moving of online redo log files to new location.
Useful metalink notes : How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1]
Useful metalink notes : How to Change The Location Of Redo Log Files [ID 395062.1]

Related to data files, online redo files there are several database parameters that must be changed. Change db_recovery_file_dest (used as an archive log location among other things)and db_create_file_dest (default datafile location)
NAME      TYPE     VALUE
----------------------- -------- -------
db_recovery_file_dest   string   +FLASH
db_create_file_dest     string   +DATA

SQL> alter system set db_recovery_file_dest='+NEWFLASH' scope=both sid='*';
System altered.

SQL> alter system set db_create_file_dest='+newdata' scope=both sid='*';
System altered.

NAME      TYPE     VALUE
----------------------- -------- -------
db_recovery_file_dest   string   +NEWFLASH
db_create_file_dest     string   +NEWDATA
Change the db_create_online_log_dest* location as well
SQL> alter system set db_create_online_log_dest_1='+newdata' SCOPE=BOTH SID='*';
System altered.

SQL> alter system set db_create_online_log_dest_2='+newflash' SCOPE=BOTH SID='*';
System altered.
Archive the current log files and verify they archive to new location (if only recovery file dest is used for archive logs)
SQL> alter system archive log current;
SQL> select max(sequence#),thread# from v$archived_log  group by thread#;

MAX(SEQUENCE#)    THREAD#
-------------- ----------
           200          1
           151          2

SQL> select name from v$archived_log where (sequence#=200 and thread#=1) or (sequence#=151 and thread#=2);

NAME
----------------------------------------------------------------------
+NEWFLASH/std11g2/archivelog/2013_01_31/thread_1_seq_200.261.806153191
+NEWFLASH/std11g2/archivelog/2013_01_31/thread_2_seq_151.262.806153193
Create a tablespace without specifying the datafile clause and see if db create file dest uses new location
SQL> create tablespace abc;
Tablespace created.

SQL> select tablespace_name,file_name from dba_data_files where tablespace_name='ABC';

TABLESPACE_NAME                FILE_NAME
------------------------------ --------------------------------------------------
ABC                            +NEWDATA/std11g2/datafile/abc.270.806153661
Query following views v$controlfile,v$datafile,v$tempfile,v$logfile (also v$block_change_tracking if block tracking is enabled) to verify that no file exists in the ASM diskgroup about to be dropped. Querying ASM views show what type of files remain in the ASM diskgroups
SQL> select ag.name,af.type from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=2;

NAME  TYPE
----- ---------------
DATA  CONTROLFILE
DATA  PARAMETERFILE
Since control file and SPFile both moved out this ASM diskgroup could be dropped. Unmount the diskgroup from all nodes except one and drop it from there.
SQL> alter diskgroup data dismount;
Diskgroup altered.

SQL> drop diskgroup data including contents;
Diskgroup dropped.

2.6. Moving backup files to new ASM diskgroup
In this setup the only backup related parameter was the db_recovery_file_dest parameter which was modified in the 2.5 to reflect the new ASM diskgroup name. Therefore subsequent backups will use this new ASM diskgroup. If the existing backups could be discarded then there's no more steps required and the old ASM diskgroup could be dropped. However if the existing backups need to be moved to the new ASM diskgroup location then further steps are needed.
To clear any archive logs that still remains in the ASM diskgroup that will be dropped, backup and delete the archive logs with
backup archivelog all delete input;
Find out the file types that are in the backup related disk group (in this case flash).
SQL> select distinct af.type,ag.name from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=3;

NAME                 TYPE
-------------------- --------------------
FLASH                CONTROLFILE
FLASH                BACKUPSET
FLASH                AUTOBACKUP
Using ASMCMD create a new directory structure in the new ASM diskgroup similar to existing backup files directory structure.
ASMCMD> cd +newflash/std11g2/
ASMCMD> mkdir backupset
ASMCMD> cd backupset
ASMCMD> mkdir 2013_01_31
Remember to copy the files without file number of incarnation. (Explained in ASMCMD cp command fails with ORA-15046 [ID 452158.1])
ASMCMD> cp +flash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145_0.266.806154115 +newflash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145
copying +flash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145_0.266.806154115 -> +newflash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145
ASMCMD> ls +newflash/std11g2/backupset/2013_01_31
annnf0_TAG20130131T114145
...
ASMCMD> cp +flash/std11g2/autobackup/2013_01_31/s_806158183.279.806158185 +newflash/std11g2/autobackup/2013_01_31/s_806158183
Once all the backup files are copied over catalog the recovery area
RMAN> catalog recovery area;

using target database control file instead of recovery catalog
searching for all files in the recovery area

List of Files Unknown to the Database
=====================================
File Name: +newflash/STD11G2/backupset/2013_01_31/annnf0_TAG20130131T114145
File Name: +newflash/STD11G2/AUTOBACKUP/2013_01_31/s_806158183

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +newflash/STD11G2/backupset/2013_01_31/annnf0_TAG20130131T114145
File Name: +newflash/STD11G2/AUTOBACKUP/2013_01_31/s_806158183

List of files in Recovery Area not managed by the database
==========================================================
File Name: +NEWFLASH/std11g2/controlfile/current.256.806086609
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_1.257.806152615
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_2.258.806152855
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_3.259.806152859
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_4.260.806152863
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter

number of files not managed by recovery area is 5, totaling 217.84MB
Message "RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter" has been explained in Ora-19816 raised in alert log after creating new log group in FRA [ID 1100416.1]
Delete backup files in the ASM diskgroup to be removed with
RMAN> delete backup COMPLETED BEFORE 'sysdate -2';
or using backup file specific tag.
RMAN> delete backup tag 'TAG20130131T114145';
It is also possible to drop the backup related files along with the disk group if removing backups files one at a time is not convenient. Verify the types of files in the ASM diskgroup all have been migrated to new ASM diskgroups
SQL> select distinct af.type,ag.name from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=3;

TYPE            NAME
--------------- ------------------------------
AUTOBACKUP      FLASH
BACKUPSET       FLASH
CONTROLFILE     FLASH
In this case controflile was migrated and backup files were copied over and remaining files will be dropped along with the disk group. Dismount the disk group being dropped from all ASM instances except one.
SQL> alter diskgroup flash dismount;
Diskgroup altered.
Drop the ASM diskgroup from the ASM instance where it is still mounted
SQL> drop diskgroup flash including contents;
Diskgroup dropped.
With this step the entire RAC is now running on the new set of ASM diskgroups
SQL> select name from v$asm_diskgroup;

NAME
-------------
NEWCLUSTERDG
NEWDATA
NEWFLASH

Monday, May 21, 2012

OCR Mirror Size and some other OCR Observations

Oracle documentation states on 11.1 for clusterware files (ocr,vote disks) for new installation partitions of 280MB is sufficient. This will fine for new installation but if the system was created with only one ocr file and later on it is decided to add an ocrmirror then that partition must be same size as the ocr, having a size of 280MB itself is not enough.
Current ocr configuration.
# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3840
         Available space (kbytes) :     293100
         ID                       :  675013742
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
There's only one ocr file. Create another disk partition for ocrmirror which is larger than 280MB but less than the size of the current ocr.
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          37      297171   83  Linux
/dev/sde1               1          36      289138+  83  Linux
Trying to add this partition as an ocrmirror will fail
./ocrconfig -replace ocrmirror /dev/sde1
PROT-22: Storage too small
on the log file created in $CRS_HOME/log/rac1/client
Oracle Database 11g CRS Release 11.1.0.7.0 - Production Copyright 1996, 2007 Oracle. All rights reserved.
2012-05-18 13:25:21.692: [ OCRCONF][2121096064]ocrconfig starts...
2012-05-18 13:25:21.706: [  OCRCLI][2121096064]proac_replace_dev:[/dev/sde1]: Failed. Retval [31]
2012-05-18 13:25:21.706: [ OCRCONF][2121096064]The input OCR device is too small to mirror the OCR content
2012-05-18 13:25:21.706: [ OCRCONF][2121096064]Exiting [status=failed]...
Recreate a new partition of same size and set the ocr permissions
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          37      297171   83  Linux
/dev/sde1               1          37      297171   83  Linux

chown root:oinstall /dev/sde1
chmod 640 /dev/sde1
Change into the directory $CRS_HOME/bin for some reason using the full path fails
$CRS_HOME/bin/ocrconfig -replace ocrmirror /dev/sde1
PROT-21: Invalid parameter
On the ocrconfig log file generated
# more ocrconfig_8335.log
Oracle Database 11g CRS Release 11.1.0.7.0 - Production Copyright 1996, 2007 Oracle. All rights reserved.
2012-05-18 14:08:05.745: [ OCRCONF][1000385408]ocrconfig starts...
2012-05-18 14:08:05.753: [  OCRCLI][1000385408]proac_replace_dev:[/dev/sde1]: Failed. Retval [8]
2012-05-18 14:08:05.754: [ OCRCONF][1000385408]The input OCR device either is identical to the other device or cannot be opened
2012-05-18 14:08:05.754: [ OCRCONF][1000385408]Exiting [status=failed]...
Running from bin directory
bin]# ./ocrconfig -replace ocrmirror /dev/sde1

# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3840
         Available space (kbytes) :     293100
         ID                       :  675013742
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
ocrmirror is sucessfully added.


OCR Corruption
Current ocr configuration
ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3880
         Available space (kbytes) :     293060
         ID                       :  675013742
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
Corrupt the primary ocr file
# dd if=/dev/zero of=/dev/sdb1 bs=8192 count=15
15+0 records in
15+0 records out
122880 bytes (123 kB) copied, 0.000178 seconds, 690 MB/s
With a mirror ocr the system should be able to function without a problem. But for a while all ocrcheck, ocrconfig and even shutdown will fail.
# ocrcheck
PROT-602: Failed to retrieve data from the cluster registry
Cannot shutdown the cluster to do a restore
crsctl stop crs
Oracle Cluster Registry initialization failed accessing Oracle Cluster Registry device: PROC-26: Error while accessing the physical storage
no other orcconfig commands will work either (these are not relavent to the problem at hand)
$CRS_HOME/bin/ocrconfig -overwrite
PROT-19: Cannot proceed while clusterware is running. Shutdown clusterware first

$CRS_HOME/bin/ocrconfig -repair ocr /dev/sdb1
PROT-19: Cannot proceed while clusterware is running. Shutdown clusterware first
When the ocrcheck is run an ocrcheck log is generated in $CRS_HOM/log/hostname/client which will say working ocr file which doesn't have enough votes. The file name is listed in the cluster alert log
[client(16730)]CRS-1011:OCR cannot determine that the OCR content contains the latest updates. Details in /opt/crs/oracle/product/11.1.0/crs/log/rac1/client/ocrcheck_16730.log.

more ocrcheck_16730.log
Oracle Database 11g CRS Release 11.1.0.7.0 - Production Copyright 1996, 2007 Oracle. All rights reserved.
2012-05-18 14:23:10.801: [OCRCHECK][3369040768]ocrcheck starts...
2012-05-18 14:23:10.820: [  OCRRAW][3369040768]propriogid:1: INVALID FORMAT
2012-05-18 14:23:10.820: [  OCRRAW][3369040768]proprioini: disk 1 (/dev/sde1) does not have enough votes (1,2)
2012-05-18 14:23:10.821: [  OCRRAW][3369040768]proprinit: Could not open raw device
2012-05-18 14:23:10.821: [ default][3369040768]a_init:7!: Backend init unsuccessful : [26]
2012-05-18 14:23:10.821: [OCRCHECK][3369040768]Failed to access OCR repository: [PROC-26: Error while accessing the physical storage]
2012-05-18 14:23:10.821: [OCRCHECK][3369040768]Failed to initialize ocrchek2
2012-05-18 14:23:10.821: [OCRCHECK][3369040768]Exiting [status=failed]...
If it's know which disk (ocr or ocrmirror) is corrupted it could be droped to resolve the issue. If it's not known which disk (if it's the ocr or the ocrmirror) then this method is of no use.
Since it's know that ocr was the corrupted disk
./ocrconfig -replace ocr
If it's the ocrmirror then this should be
./ocrconfig -replace ocrmirror
This will generate following on the cluster alert log
2012-05-18 14:30:18.841
[crsd(3915)]CRS-1010:The OCR mirror location /dev/sdb1 was removed.
In the alert log /dev/sdb1 is refered as ocr mirror(!?).
After the corrupted disk is dropped the ocrcheck list the single ocr file in use
./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3880
         Available space (kbytes) :     293060
         ID                       :  675013742
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded

                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
Add the corrupted disk back again to bring the system with two ocr disks.
./ocrconfig -replace ocrmirror /dev/sdb1

# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3880
         Available space (kbytes) :     293060
         ID                       :  675013742
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded
         Logical corruption check succeeded
Useful metalink notes
OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]
Information On OCR And Voting Disk In Oracle 10gR2 Clusterware (RAC) [ID 1092293.1]

Friday, September 24, 2010

Restoring OCR & Vote disk due to ASM disk failures - 3

There are few changes to the setup that was used to test various ASM disk failure scenarios and restoring OCR and Vote disks. The main change is, setup used is no longer the RAC setup upgraded from 10gR2 to 11gR1 and then to 11gR2
It's a new installation of 11gR2 grid infrastructure (only GI was installed no RAC database was created. Installing GI was sufficient to test this scenario) and therefore the ASM spfile is also inside the same diskgroup as clusterware files. Metalink note 1082943.1 explains how to move it to another diskgroup. If not a pfile from the spfile should be created to re-create the spfile after the ocr and vote disk restore.

Scenario 3.

1. Both OCR and Vote disks are in ASM diskgroup
2. ASM diskgroup has normal redundancy with only three failure groups
3. All failure groups are affected
4. ASM Spfile is also located in the same diskgroup where clusterware files are located.

1. Current OCR, vote disk and ASM Spfile configuration
# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2272
Available space (kbytes) : 259848
ID : 1242190491
Device/File Name : +clusterdg
Device/File integrity check succeeded
Device/File not configured

Cluster registry integrity check succeeded
Logical corruption check succeeded


$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 7d49533611734f3bbf404d32f1759ed5 (ORCL:CLUS1) [CLUSTERDG]
2. ONLINE 4a8c288d1ade4f8cbf6588c145b27489 (ORCL:CLUS2) [CLUSTERDG]
3. ONLINE ad241f9823cd4fb9bf3412ca67e591df (ORCL:CLUS3) [CLUSTERDG]
Located 3 voting disk(s).

SQL> show parameter spfile

NAME TYPE VALUE
----------- ---------- -----
spfile string +CLUSTERDG/hpc-cluster/asmparameterfile/registry.253.730565167

srvctl config asm -a
ASM home: /opt/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
2. Identify the disks beloging to the ASM diskgroup using oracleasm query -p and corrupt them to simulate disk failure
# dd if=/dev/zero of=/dev/sdc10 count=204800 bs=8192
204800+0 records in
204800+0 records out
1677721600 bytes (1.7 GB) copied, 1.61087 seconds, 1.0 GB/s

# dd if=/dev/zero of=/dev/sdc3 count=204800 bs=8192
204800+0 records in
204800+0 records out
1677721600 bytes (1.7 GB) copied, 1.6883 seconds, 994 MB/s

# dd if=/dev/zero of=/dev/sdc2 count=204800 bs=8192
204800+0 records in
204800+0 records out
1677721600 bytes (1.7 GB) copied, 1.74684 seconds, 960 MB/s
3. ocssd.log will show the detection of vote disk corruption
2010-09-24 15:46:02.893: [    CSSD][1136630080]clssgmDestroyProc: cleaning up proc(0x2aaab02131b0) con(0x8db0) skgpid  ospid 12671 with 0 clients, refcount 0
2010-09-24 15:46:02.893: [ CSSD][1136630080]clssgmDiscEndpcl: gipcDestroy 0x8db0
2010-09-24 15:46:03.009: [ CSSD][1231038784]clssnmvDiskKillCheck: voting disk corrupted (0x00000000,0x00000000) (ORCL:CLUS1)
2010-09-24 15:46:03.009: [ CSSD][1231038784]clssnmvDiskAvailabilityChange: voting file ORCL:CLUS1 now offline
2010-09-24 15:46:03.584: [ CLSF][1241528640]Closing handle:0x2aaab008cbe0
...
2010-09-24 15:46:03.584: [ SKGFD][1241528640]Lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: closing handle 0x2aaab0197570 for disk :ORCL:CLUS1:
2010-09-24 15:46:13.269: [ CSSD][1168099648]clssnmvDiskKillCheck: voting disk corrupted (0x00000000,0x00000000) (ORCL:CLUS3)
2010-09-24 15:46:13.269: [ CSSD][1168099648]clssnmvDiskAvailabilityChange: voting file ORCL:CLUS3 now offline
2010-09-24 15:46:13.431: [ CLSF][1157609792]Closing handle:0x2aaab006ac20
2010-09-24 15:46:13.431: [ SKGFD][1157609792]Lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: closing handle 0x2aaab0062830 for disk :ORCL:CLUS3:
Querying vote disks frequently will enable to spot the state change
$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. PENDOFFL 7d49533611734f3bbf404d32f1759ed5 (ORCL:CLUS1) [CLUSTERDG]
2. ONLINE 4a8c288d1ade4f8cbf6588c145b27489 (ORCL:CLUS2) [CLUSTERDG]
3. ONLINE ad241f9823cd4fb9bf3412ca67e591df (ORCL:CLUS3) [CLUSTERDG]
Located 3 voting disk(s).

$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 7d49533611734f3bbf404d32f1759ed5 (ORCL:CLUS1) [CLUSTERDG]
2. ONLINE 4a8c288d1ade4f8cbf6588c145b27489 (ORCL:CLUS2) [CLUSTERDG]
3. ONLINE ad241f9823cd4fb9bf3412ca67e591df (ORCL:CLUS3) [CLUSTERDG]
Located 3 voting disk(s).
crs_stat (deprecated in 11gR2) shows cluster applications are running but ocrcheck fails
crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....ERDG.dg ora....up.type ONLINE ONLINE hpc1
ora....ER.lsnr ora....er.type ONLINE ONLINE hpc1
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
ora.asm ora.asm.type ONLINE ONLINE hpc1
ora.eons ora.eons.type ONLINE ONLINE hpc1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE hpc1
ora....C1.lsnr application ONLINE ONLINE hpc1
ora.hpc1.gsd application OFFLINE OFFLINE
ora.hpc1.ons application ONLINE OFFLINE
ora.hpc1.vip ora....t1.type ONLINE ONLINE hpc1
ora....network ora....rk.type ONLINE ONLINE hpc1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE OFFLINE
ora....ry.acfs ora....fs.type ONLINE ONLINE hpc1
ora.scan1.vip ora....ip.type OFFLINE OFFLINE

ocrcheck
PROT-602: Failed to retrieve data from the cluster registry
PROC-26: Error while accessing the physical storage
4. Stop the crs on all nodes and start crs in exclusive mode in one node. Manual shutdown of ASM instance and database instance might be required if the stop command is unable complete these operations.
crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.crsd' on 'hpc1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.CLUSTERDG.dg' on 'hpc1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'hpc1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'hpc1'
CRS-2677: Stop of 'ora.registry.acfs' on 'hpc1' succeeded
CRS-4549: Unexpected disconnect while executing shutdown request.
CRS-2677: Stop of 'ora.crsd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hpc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.evmd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.asm' on 'hpc1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hpc1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hpc1'
CRS-2677: Stop of 'ora.cssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'hpc1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'hpc1'
CRS-2677: Stop of 'ora.gipcd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hpc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hpc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

crsctl start crs -excl
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.gipcd' on 'hpc1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'hpc1'
CRS-2676: Start of 'ora.gipcd' on 'hpc1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hpc1'
CRS-2676: Start of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'hpc1'
CRS-2676: Start of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'hpc1'
CRS-2679: Attempting to clean 'ora.diskmon' on 'hpc1'
CRS-2681: Clean of 'ora.diskmon' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.diskmon' on 'hpc1'
CRS-2676: Start of 'ora.diskmon' on 'hpc1' succeeded
CRS-2676: Start of 'ora.cssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'hpc1'
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'hpc1'
CRS-2676: Start of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'hpc1'
CRS-2676: Start of 'ora.asm' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'hpc1'
CRS-2676: Start of 'ora.crsd' on 'hpc1' succeeded
Various log files will show the status of vote disks and ocr disks. ocssd.log
2010-09-24 15:53:43.643: [    CSSD][1147734336]clssnmvDiskVerify: Successful discovery of 0 disks
2010-09-24 15:53:43.643: [ CSSD][1147734336]clssnmCompleteInitVFDiscovery: Completing initial voting file discovery
2010-09-24 15:53:43.643: [ CSSD][1147734336]clssnmvFindInitialConfigs: No voting files found
2010-09-24 15:53:43.644: [ CSSD][1147734336]clssnmCompleteVFDiscovery: Completing voting file discovery
2010-09-24 15:53:43.644: [ CSSD][1147734336]clssnmvVerifyCommittedConfigVFs: Insufficient voting files found, found 0 of 0 configured, needed 1 voting files
crsd.log
2010-09-24 15:54:30.723: [  OCRASM][21660240]proprasmo: kgfoCheckMount returned [6]
2010-09-24 15:54:30.723: [ OCRASM][21660240]proprasmo: The ASM disk group clusterdg is not found or not mounted
2010-09-24 15:54:30.724: [ OCRRAW][21660240]proprioo: Failed to open [+clusterdg].
Returned proprasmo() with [26]. Marking loc
ion as UNAVAILABLE.
2010-09-24 15:54:30.724: [ OCRRAW][21660240]proprioo: No OCR/OLR devices are usable
2010-09-24 15:54:30.724: [ OCRASM][21660240]proprasmcl: asmhandle is NULL
2010-09-24 15:54:30.724: [ OCRRAW][21660240]proprinit: Could not open raw device
2010-09-24 15:54:30.724: [ OCRASM][21660240]proprasmcl: asmhandle is NULL
2010-09-24 15:54:30.724: [ OCRAPI][21660240]a_init:16!: Backend init unsuccessful : [26]
2010-09-24 15:54:30.724: [ CRSOCR][21660240] OCR context init failure. Error: PROC-26: Error while accessing the physical sto
ge ASM error [SLOS: cat=8, opn=kgfoOpenFile01, dep=15056, loc=kgfokge
ORA-17503: ksfdopn:DGOpenFile05 Failed to open file +CLUSTERDG.255.4294967295
ORA-17503: ksfdopn:2 Failed to open file +CLUSTERDG.255.4294967295
ORA-15001: disk] [8]
2010-09-24 15:54:30.724: [ CRSD][21660240][PANIC] CRSD exiting: Could not init OCR, code: 26
2010-09-24 15:54:30.724: [ CRSD][21660240] Done.
ASM alert log shows why the diskgroup containign vote disks and ocr wasn't mounted
SQL> ALTER DISKGROUP ALL MOUNT /* asm agent */
Diskgroup used for OCR is:CLUSTERDG
NOTE: cache registered group CLUSTERDG number=1 incarn=0x6ed824a0
NOTE: cache began mount (first) of group CLUSTERDG number=1 incarn=0x6ed824a0
NOTE: Loaded library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so
ERROR: no PST quorum in group: required 2, found 0
5. There's no SPfile for ASM but instance will be up
SQL> show parameter spfile

NAME TYPE VALUE
------- --------- ------
spfile string
6. To test various replace and repair scenarios, a diskgroup was created with a different name. Oracle Clusterware Admin Guide states "If the original OCR location does not exist, then you must create an empty (0 byte) OCR location before you run the ocrconfig -add or ocrconfig -replace commands. The OCR location that you are replacing can be either online or offline."

Replace and repair options could be used to replace the current location and to add, add and replace existing OCR locations. Cluster Admin guide also states "You cannot repair the OCR on a node on which Oracle Clusterware is running.If you run the ocrconfig -add | -repair | -replace command, then the device, file, or Oracle ASM disk group that you are adding must be accessible. This means that a device must exist. You must create an empty (0 byte) OCR location, or the Oracle ASM disk group must exist and be mounted."

There's the question of moutning ASM diskgroup while the crs down. If you try to manually mount the ASM instnace that is part of a cluster you'd get
sqlplus  / as sysasm

SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
All of the replace and repair option were useless and failed
# ocrconfig -restore /opt/app/11.2.0/grid/cdata/hpc-cluster/backup_20100924_142540.ocr
PROT-16: Internal Error

# ocrconfig -replace +clusterdg -replacement +clusterdgbk
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location

# ocrconfig -repair -replace +clusterdg -replacement +clusterdgbk
PROT-21: Invalid parameter

# ocrconfig -repair -replace +clusterdg -replacement +clusterdgbk
PROT-21: Invalid parameter

# ocrconfig -repair -add +clusterdgbk
PROT-21: Invalid parameter

# ocrconfig -add +clusterdgbk
PROT-1: Failed to initialize ocrconfig
Even creating diskgroup with the original name and another one with new name and trying to repair replace also failed
SQL> create diskgroup clusterdg disk 'ORCL:CLUS1' disk 'ORCL:CLUS2' disk 'ORCL:CLUS3' attribute 'compatible.asm'='11.2';
Diskgroup created.

SQL> create diskgroup clusterdg2 disk 'ORCL:RED1' disk 'ORCL:RED2' disk 'ORCL:RED3' attribute 'compatible.asm'='11.2';
Diskgroup created.

# ocrconfig -repair -replace +clusterdg -replacement +clusterdg2
PROT-21: Invalid parameter
7. Finally created a diskgroup with the same name as original and did the OCR restore
SQL> create diskgroup clusterdg disk 'ORCL:RED1' disk 'ORCL:RED2' disk 'ORCL:RED3' attribute 'compatible.asm'='11.2';

ocrconfig -restore /opt/app/11.2.0/grid/cdata/hpc-cluster/backup_20100924_142540.ocr
Unlike the previous scenario there's no crs restart required to restore the vote disks, it was possible to restore the vote disks after restoring ocr
# crsctl query css votedisk
Located 0 voting disk(s).

# crsctl replace votedisk +clusterdg
Successful addition of voting disk 92814292a2ec4fa7bf2d6fe10960cc55
Successful addition of voting disk 57b152766d5f4f3dbf2935c93556b7f5
Successful addition of voting disk 6120792eb1284f64bf958f13a4947ece
Successfully replaced voting disk group with +clusterdg.
CRS-4266: Voting file(s) successfully replaced
8. Stop the crs on the node and start crs on all nodes
crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hpc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.asm' on 'hpc1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hpc1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hpc1'
CRS-2677: Stop of 'ora.cssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'hpc1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'hpc1'
CRS-2677: Stop of 'ora.gipcd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hpc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hpc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
9. The last step in this scenario is recreate the ASM SPfile. When ASM instance is started with a spfile or pfile, ASM alert log shows the file location. For spfile
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options.
Using parameter settings in server-side spfile +CLUSTERDG/hpc-cluster/asmparameterfile/registry.253.730565167
System parameters with non-default values:
large_pool_size = 12M
instance_type = "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskstring = "ORCL:CLUS*"
asm_power_limit = 1
diagnostic_dest = "/opt/app/oracle"
Cluster communication is configured to use the following interface(s) for this instance
For pfile
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options.
Using parameter settings in client-side pfile /opt/app/11.2.0/grid/dbs/init+ASM1.ora on machine hpc1
System parameters with non-default values:
large_pool_size = 12M
instance_type = "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskstring = "ORCL:CLUS*"
asm_power_limit = 1
diagnostic_dest = "/opt/app/oracle"
Cluster communication is configured to use the following interface(s) for this instance
But after the corruption of all the disks on the ASM diskgroup, there won't be a server side spfile and even when there's no client side pfile ASM instance starts. ASM alert log shows that it is using default parameter setting without a parameter file
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options.
WARNING: using default parameter settings without any parameter file
Cluster communication is configured to use the following interface(s) for this instance
These default parameters cannot be considered as a spfile or a pfile trying to create one would fail
SQL> create pfile='/home/oracle/pfile.ora' from spfile;
create pfile='/home/oracle/pfile.ora' from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-17502: ksfdcre:4 Failed to create file
+CLUSTERDG/hpc-cluster/asmparameterfile/registry.253.730565167
ORA-15177: cannot operate on system aliases
But a pfile could be created from these values in memory using
SQL> create pfile='/home/oracle/pfile.ora' from memory;

File created.
Or if a pfile is available from the time before the diskgroup corruption it could be used to restore the ASM spfile
SQL> create spfile='+clusterdg' from pfile='/home/oracle/asmpfile.ora';

File created.
Last command above would create a new spfile with a different alias than the original and ASM instance would use than during startup.
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options.
Using parameter settings in server-side spfile +CLUSTERDG/hpc-cluster/asmparameterfile/registry.253.730908391
System parameters with non-default values:
large_pool_size = 12M
instance_type = "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskstring = "ORCL:CLUS*"
asm_power_limit = 1
diagnostic_dest = "/opt/app/oracle"
Cluster communication is configured to use the following interface(s) for this instance
Useful Metalink note
How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062983.1]

Friday, September 17, 2010

Restoring OCR and Vote disk due to ASM disk failures - 2

Earlier blog posts was about restoring OCR & Vote disk when only one of the disks in the ASM disk group containing them suffers a failure.

This post is when two disks in the ASM diskgroup are affected by some failure. The procedure is different to that of loosing two disks when only one of the clusterware files(OCR, Vote) is in the disk group.

Because the diskgroup (in this case normal redundancy) loses its quorum it won't be mountable and would require the recreation of asm diskgroup and restoring OCR first and then Vote disk.

Scenario 2.
1. Both OCR and Vote disks are in ASM diskgroup
2. ASM diskgroup has normal redundancy with only three failure groups
3. Only Two failure groups are affected

1. Current OCR and vote disk configuration.
ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2616
Available space (kbytes) : 259504
ID : 2002737697
Device/File Name : +CLUSTERDG
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded

crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 34845aa0b29d4f36bf8743e3506eba12 (ORCL:CLUS2) [CLUSTERDG]
2. ONLINE 1200c8daed494fbabf6f64ee6e07fde8 (ORCL:CLUS3) [CLUSTERDG]
3. ONLINE 98557cefaca24fcdbf8807f3dd1fbd29 (ORCL:CLUS1) [CLUSTERDG]
Located 3 voting disk(s).
2. Corrupt the disks to simulate disk failure.
# /etc/init.d/oracleasm querydisk -p clus1
Disk "CLUS1" is a valid ASM disk
/dev/sdc2: LABEL="CLUS1" TYPE="oracleasm"

# /etc/init.d/oracleasm querydisk -p clus2
Disk "CLUS2" is a valid ASM disk
/dev/sdc3: LABEL="CLUS2" TYPE="oracleasm"

# dd if=/dev/zero of=/dev/sdc2 count=204800 bs=8192
204800+0 records in
204800+0 records out
1677721600 bytes (1.7 GB) copied, 1.6441 seconds, 1.0 GB/s

# dd if=/dev/zero of=/dev/sdc3 count=204800 bs=8192
204800+0 records in
204800+0 records out
1677721600 bytes (1.7 GB) copied, 1.59438 seconds, 1.1 GB/s
3. ocssd.log will show the vote disk corruption being detected.
2010-09-15 15:26:04.272: [    CSSD][1332816192]clssnmvDiskKillCheck: voting disk corrupted (0x00000000,0x00000000) (ORCL:CLUS1)
2010-09-15 15:26:04.272: [ CSSD][1332816192]clssnmvDiskAvailabilityChange: voting file ORCL:CLUS1 now offline
2010-09-15 15:26:04.364: [ CLSF][1322326336]Closing handle:0x126d1f50
2010-09-15 15:26:04.364: [ SKGFD][1322326336]Lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: closing handle 0x12927d50 for
disk :ORCL:CLUS1:
4. Querying the vote disks possibel whereas ocrcheck fails
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 34845aa0b29d4f36bf8743e3506eba12 (ORCL:CLUS2) [CLUSTERDG]
2. ONLINE 1200c8daed494fbabf6f64ee6e07fde8 (ORCL:CLUS3) [CLUSTERDG]
3. ONLINE 98557cefaca24fcdbf8807f3dd1fbd29 (ORCL:CLUS1) [CLUSTERDG]
Located 3 voting disk(s).

# ocrcheck
PROT-602: Failed to retrieve data from the cluster registry
PROC-26: Error while accessing the physical storage
5. Stop the cluster and crs services
# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.crsd' on 'hpc1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'hpc1'
CRS-2673: Attempting to stop 'ora.CLUSTERDG.dg' on 'hpc1'
CRS-2673: Attempting to stop 'ora.clusdb.db' on 'hpc1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'hpc1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'hpc1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'hpc1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.hpc1.vip' on 'hpc1'
CRS-2677: Stop of 'ora.scan1.vip' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.hpc1.vip' on 'hpc1' succeeded
CRS-4549: Unexpected disconnect while executing shutdown request.
CRS-2675: Stop of 'ora.crsd' on 'hpc1' failed
CRS-2679: Attempting to clean 'ora.crsd' on 'hpc1'
CRS-4548: Unable to connect to CRSD
CRS-2678: 'ora.crsd' on 'hpc1' 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 'hpc1' has failed
CRS-4687: Shutdown command has completed with error(s).
CRS-4000: Command Stop failed, or completed with errors.

# crsctl stop cluster
CRS-2673: Attempting to stop 'ora.crsd' on 'hpc1'
CRS-4548: Unable to connect to CRSD
CRS-2675: Stop of 'ora.crsd' on 'hpc1' failed
CRS-2679: Attempting to clean 'ora.crsd' on 'hpc1'
CRS-4548: Unable to connect to CRSD
CRS-2678: 'ora.crsd' on 'hpc1' has experienced an unrecoverable failure
CRS-0267: Human intervention required to resume its availability.
CRS-4000: Command Stop failed, or completed with errors.
Some of the components fails to shutdown. Use the force option to stop the crs but even then ASM instnace and database instnace will remain open, they must be manually shutdown loging in as sys / sysdba[sysasm]
# crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hpc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.evmd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.asm' on 'hpc1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hpc1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hpc1'
CRS-2677: Stop of 'ora.cssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'hpc1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'hpc1'
CRS-2677: Stop of 'ora.gipcd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hpc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hpc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
6. Start the crs on one node in exclusive mode.
# crsctl start crs -excl
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.gipcd' on 'hpc1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'hpc1'
CRS-2676: Start of 'ora.gipcd' on 'hpc1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hpc1'
CRS-2676: Start of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'hpc1'
CRS-2676: Start of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'hpc1'
CRS-2679: Attempting to clean 'ora.diskmon' on 'hpc1'
CRS-2681: Clean of 'ora.diskmon' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.diskmon' on 'hpc1'
CRS-2676: Start of 'ora.diskmon' on 'hpc1' succeeded
CRS-2676: Start of 'ora.cssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'hpc1'
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'hpc1'
CRS-2676: Start of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'hpc1'
CRS-2676: Start of 'ora.asm' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'hpc1'
CRS-2676: Start of 'ora.crsd' on 'hpc1' succeeded
Stop the crsd if started
crsctl stop resource ora.crsd -init
ocssd.log will show only one vote disk is detected
2010-09-15 15:34:19.853: [    CLSF][1148365120]Opened hdl:0x13512f20 for dev:ORCL:CLUS3:
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: Successful discovery for disk ORCL:CLUS3, UID 1200c8da-ed494fba-bf6f64ee-6e07fde8, Pending CIN 0:1284559165:0, Committed CIN 0:1284559165:0
2010-09-15 15:34:19.865: [ CLSF][1148365120]Closing handle:0x13512f20
2010-09-15 15:34:19.865: [ SKGFD][1148365120]Lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: closing handle 0x1350a590 for
disk :ORCL:CLUS3:

2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: file is not a voting file, cannot recognize on-disk signature for a voting
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmvDiskVerify: Successful discovery of 1 disks
2010-09-15 15:34:19.865: [ CSSD][1148365120]clssnmCompleteInitVFDiscovery: Completing initial voting file discovery
7. At this all the diskgroup will be dismount state and trying to mount them or drop them with force option will result in an error.
SQL> select name,state from v$asm_diskgroup;
NAME STATE
--------------- ---------------
CLUSTERDG DISMOUNTED
DATA DISMOUNTED
FLASH DISMOUNTED

SQL> alter diskgroup clusterdg mount force;
alter diskgroup clusterdg mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "CLUSTERDG" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"CLUSTERDG"
11g has a new ASM command option which allows asm diskgroup to be dropped when they are offline. But this too fails because disk group contains vote disks
SQL> drop diskgroup clusterdg force including contents;
drop diskgroup clusterdg force including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15276: ASM diskgroup CLUSTERDG has cluster voting files
Querying the ora-15276 error code shows
oerr ora 15276
15276, 00000, "ASM diskgroup %s has cluster voting files"
// *Cause: An attempt was made to drop a diskgroup that contained cluster
// voting files.
// *Action: Move the cluster voting files out of the diskgroup and retry the
// operation.
But trying to move the vote disks will also fail due to unavailability of the crs
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. OFFLINE 6c23b17c25c34fb2bf02b3d6979a3e29 () []
2. OFFLINE 34845aa0b29d4f36bf8743e3506eba12 () []
3. ONLINE 1200c8daed494fbabf6f64ee6e07fde8 (ORCL:CLUS3) [CLUSTERDG]
4. OFFLINE 98557cefaca24fcdbf8807f3dd1fbd29 () []
Located 4 voting disk(s).

crsctl replace votedisk /dev/sdc6
Oracle Cluster Registry initialization failed accessing Oracle Cluster Registry device: PROC-26: Error while accessing the physical storage ASM error [SLOS: cat=6, opn=kgfo, dep=0, loc=kgfoCkMt03
diskgroup CLUSTERDG not mounted ()
] [6]
CRS-4000: Command Replace failed, or completed with errors.
Solution is to restore the OCR first and have the crs up and running before dealing with vote disks.

8. Repair the failed disks and create a new disk group, use the surviving disk in the new disk group with force option
# /etc/init.d/oracleasm deletedisk clus1
Removing ASM disk "clus1": [ OK ]
# /etc/init.d/oracleasm deletedisk clus2
Removing ASM disk "clus2": [ OK ]

# /etc/init.d/oracleasm createdisk clus1 /dev/sdc2
Marking disk "clus1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk clus2 /dev/sdc3
Marking disk "clus2" as an ASM disk: [ OK ]

SQL> create diskgroup clusterdgbk disk 'ORCL:CLUS1' DISK 'ORCL:CLUS2' DISK 'ORCL:CLUS3' force attribute 'compatible.asm'='11.2';

Diskgroup created.

SQL> select name,state from v$asm_diskgroup;

NAME STATE
--------------- --------
CLUSTERDG MOUNTED
9. Trying to replace the vote disks would still fail because crs is not available
crsctl replace votedisk +clusterdgbk
Oracle Cluster Registry initialization failed accessing Oracle Cluster Registry device: PROC-26: Error while accessing the physical storage ASM error [SLOS: cat=6, opn=kgfo, dep=0, loc=kgfoCkMt03
diskgroup CLUSTERDG not mounted ()
] [6]
CRS-4000: Command Replace failed, or completed with errors.
Restoring crs would also fail because it is still looking for the old diskgroup name.
/ocrconfig -restore /opt/app/11.2.0/grid/cdata/hpc-cluster/backup_20100915_151240.ocr
PROT-16: Internal Error
Recreate the diskgroup with the same name and restore the ocr from a backup file
SQL> alter diskgroup clusterdgbk dismount;

Diskgroup altered.

SQL> create diskgroup clusterdg disk 'ORCL:CLUS1' force disk 'ORCL:CLUS2' force DISK 'ORCL:CLUS3' force attribute 'compatible.asm'='11.2';

Diskgroup created.

./ocrconfig -restore /opt/app/11.2.0/grid/cdata/hpc-cluster/backup_20100915_151240.ocr
10. Still restoring vote disk fails because ocr files have been only restored. Stop the crs and start again in exclusive mode and restore the vote disks.
crsctl replace votedisk +clusterdg
Failed to create voting files on disk group clusterdg.
Change to configuration failed, but was successfully rolled back.
CRS-4000: Command Replace failed, or completed with errors.

crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hpc1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hpc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.asm' on 'hpc1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hpc1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hpc1'
CRS-2677: Stop of 'ora.cssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.diskmon' on 'hpc1'
CRS-2677: Stop of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'hpc1'
CRS-2677: Stop of 'ora.gipcd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hpc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hpc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

crsctl start crs -excl
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.gipcd' on 'hpc1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'hpc1'
CRS-2676: Start of 'ora.gipcd' on 'hpc1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hpc1'
CRS-2676: Start of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'hpc1'
CRS-2676: Start of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'hpc1'
CRS-2679: Attempting to clean 'ora.diskmon' on 'hpc1'
CRS-2681: Clean of 'ora.diskmon' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.diskmon' on 'hpc1'
CRS-2676: Start of 'ora.diskmon' on 'hpc1' succeeded
CRS-2676: Start of 'ora.cssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'hpc1'
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'hpc1'
CRS-2676: Start of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'hpc1'
CRS-2676: Start of 'ora.asm' on 'hpc1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'hpc1'
CRS-2676: Start of 'ora.crsd' on 'hpc1' succeeded

crsctl replace votedisk +clusterdg
Successful addition of voting disk 53dd1707604f4fc5bf910fc59bd857f8
Successful addition of voting disk 7496834c116f4f53bf72b8aa726a8ede
Successful addition of voting disk 9c6c24ea6cd74f66bf616d7624b856af
Successfully replaced voting disk group with +clusterdg.
CRS-4266: Voting file(s) successfully replaced

crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 53dd1707604f4fc5bf910fc59bd857f8 (ORCL:CLUS1) [CLUSTERDG]
2. ONLINE 7496834c116f4f53bf72b8aa726a8ede (ORCL:CLUS2) [CLUSTERDG]
3. ONLINE 9c6c24ea6cd74f66bf616d7624b856af (ORCL:CLUS3) [CLUSTERDG]
Located 3 voting disk(s).

ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2588
Available space (kbytes) : 259532
ID : 2002737697
Device/File Name : +CLUSTERDG
Device/File integrity check succeeded
Device/File not configured

Cluster registry integrity check succeeded
Logical corruption check succeeded
11. Stop the crs and start crs on normal mode on all nodes.
crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hpc1'
CRS-2673: Attempting to stop 'ora.crsd' on 'hpc1'
CRS-2677: Stop of 'ora.crsd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hpc1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hpc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.asm' on 'hpc1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hpc1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hpc1'
CRS-2677: Stop of 'ora.cssd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hpc1'
CRS-2673: Attempting to stop 'ora.diskmon' on 'hpc1'
CRS-2677: Stop of 'ora.gpnpd' on 'hpc1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'hpc1'
CRS-2677: Stop of 'ora.gipcd' on 'hpc1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hpc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hpc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
Useful Metalink note
How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062983.1]