Sunday, July 20, 2014

OCR / VOTING disk adminstration in 11gr2

Current OCR disks
-----------------

#/etc/init.d/oracleasm querydisk /dev/sd*

Device "/dev/sdb1" is marked an ASM disk with the label "NEW_OCR_1"
Device "/dev/sdc" is not marked as an ASM disk
Device "/dev/sdc1" is marked an ASM disk with the label "NEW_OCR_2"
Device "/dev/sdd" is not marked as an ASM disk
Device "/dev/sdd1" is marked an ASM disk with the label "NEW_OCR_3"
Device "/dev/sdm1" is marked an ASM disk with the label "OCR_VOTING_1"
Device "/dev/sdn" is not marked as an ASM disk
Device "/dev/sdn1" is marked an ASM disk with the label "OCR_VOTING_2"
Device "/dev/sdo" is not marked as an ASM disk
Device "/dev/sdo1" is marked an ASM disk with the label "OCR_VOTING_3"



[root@oelrac1 bin]# ./ocrconfig -showbackup

oelrac1     2014/05/10 01:26:20     /u01/grid/11.2.0/cdata/oelrac/backup00.ocr

oelrac1     2014/05/09 21:26:10     /u01/grid/11.2.0/cdata/oelrac/backup01.ocr

oelrac2     2014/03/22 01:06:56     /u01/grid/11.2.0/cdata/oelrac/backup02.ocr

oelrac1     2014/05/09 21:26:10     /u01/grid/11.2.0/cdata/oelrac/day.ocr

oelrac1     2014/05/09 21:26:10     /u01/grid/11.2.0/cdata/oelrac/week.ocr


Preparing the disks for fresh use
---------------------------------


1) Delete all the ocr disks.

/etc/init.d/oracleasm deletedisk NEW_OCR_1
/etc/init.d/oracleasm deletedisk NEW_OCR_2
/etc/init.d/oracleasm deletedisk NEW_OCR_3
/etc/init.d/oracleasm deletedisk OCR_VOTING_1
/etc/init.d/oracleasm deletedisk OCR_VOTING_2
/etc/init.d/oracleasm deletedisk OCR_VOTING_3


2) Format the /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sdm1 /dev/sdn1 /dev/sdo1

[root@oelrac1 bin]# dd if=/dev/zero of=/dev/sdb1
dd: writing to `/dev/sdb1': No space left on device
2088388+0 records in
2088387+0 records out
1069254144 bytes (1.1 GB) copied, 13.4004 s, 79.8 MB/s

-- Format all the mentioned devices using above method.


3) Check whether the header been removed.

[root@oelrac1 bin]# for i in /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sdm1 /dev/sdn1 /dev/sdo1
> do
> echo "$i" >> /tmp/disk_header.log
> /u01/grid/11.2.0/bin/kfed read $i | grep "kfbh.type" >> /tmp/disk_header.log
> done


[root@oelrac1 bin]# cat /tmp/disk_header.log
/dev/sdb1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
/dev/sdc1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
/dev/sdd1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
/dev/sdm1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
/dev/sdn1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
/dev/sdo1
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID


-- All the disk has been formatted.


[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_VOTE_1 /dev/sdb1
Marking disk "OCR_VOTE_1" as an ASM disk:                  [  OK  ]
[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_VOTE_2 /dev/sdc1
Marking disk "OCR_VOTE_2" as an ASM disk:                  [  OK  ]
[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_VOTE_3 /dev/sdd1
Marking disk "OCR_VOTE_3" as an ASM disk:                  [  OK  ]
[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_MIRR_1 /dev/sdm1
Marking disk "OCR_MIRR_1" as an ASM disk:                  [  OK  ]
[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_MIRR_2 /dev/sdn1
Marking disk "OCR_MIRR_2" as an ASM disk:                  [  OK  ]
[root@oelrac1 bin]# /etc/init.d/oracleasm createdisk OCR_MIRR_3 /dev/sdo1
Marking disk "OCR_MIRR_3" as an ASM disk:                  [  OK  ]


-- OCR disk are ready now.

=============================================================================================================


I) Scenario 1 ( Restore the OCR from the backup)
================================================

a) Backup file of ocr is below.

[root@oelrac1 bin]# ls -lrt /u01/grid/11.2.0/cdata/oelrac/backup00.ocr
-rw------- 1 root root 7176192 May 18 15:44 /u01/grid/11.2.0/cdata/oelrac/backup00.ocr


b) Start the crs in exclusive mode.

[root@oelrac1 bin]# ./crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'oelrac1'
CRS-2676: Start of 'ora.mdnsd' on 'oelrac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'oelrac1'
CRS-2676: Start of 'ora.gpnpd' on 'oelrac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oelrac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'oelrac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'oelrac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'oelrac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'oelrac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oelrac1'
CRS-2676: Start of 'ora.diskmon' on 'oelrac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oelrac1' succeeded
CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'oelrac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'oelrac1'
CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'oelrac1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'oelrac1'
CRS-2676: Start of 'ora.ctssd' on 'oelrac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'oelrac1' succeeded
CRS-2679: Attempting to clean 'ora.asm' on 'oelrac1'
CRS-2681: Clean of 'ora.asm' on 'oelrac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oelrac1'
CRS-2676: Start of 'ora.asm' on 'oelrac1' succeeded


c) Switch as grid owner and login to asm instance.

SQL> select name, state from V$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
FRA                            DISMOUNTED
DATADG                         DISMOUNTED

SQL>  select path, header_status from V$asm_disk;

PATH                                               HEADER_STATU
-------------------------------------------------- ------------
/dev/oracleasm/disks/OCR_MIRR_3                    PROVISIONED
/dev/oracleasm/disks/OCR_MIRR_2                    PROVISIONED
/dev/oracleasm/disks/OCR_MIRR_1                    PROVISIONED
/dev/oracleasm/disks/OCR_VOTE_3                    PROVISIONED
/dev/oracleasm/disks/OCR_VOTE_2                    PROVISIONED
/dev/oracleasm/disks/OCR_VOTE_1                    PROVISIONED
/dev/oracleasm/disks/DISK_NEW_1                    MEMBER
/dev/oracleasm/disks/DATA_DISK_3                   MEMBER
/dev/oracleasm/disks/DATA_DISK_2                   MEMBER
/dev/oracleasm/disks/DATA_DISK_1                   MEMBER
/dev/oracleasm/disks/DISK_NEW_4                    MEMBER
/dev/oracleasm/disks/DISK_NEW_3                    MEMBER
/dev/oracleasm/disks/DISK_NEW_2                    MEMBER
/dev/oracleasm/disks/DATA_DISK_4                   MEMBER

14 rows selected.



SQL> ! cat /etc/oracle/ocr.loc
ocrconfig_loc=+OCR_VOTING
local_only=false

d) Create the Diskgroup with the same name.

SQL> create diskgroup OCR_VOTING NORMAL REDUNDANCY DISK '/dev/oracleasm/disks/OCR_VOTE_1','/dev/oracleasm/disks/OCR_VOTE_2','/dev/oracleasm/disks/OCR_VOTE_3'
     attribute 'compatible.asm' = '11.2', 'au_size' = '4M';

Diskgroup created.


SQL> exit;

e) Now restore the OCR from backup.

[root@oelrac1 bin]# ./ocrconfig -restore /u01/grid/11.2.0/cdata/oelrac/backup00.ocr
[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2828
         Available space (kbytes) :     259292
         ID                       :  516257634
         Device/File Name         : +OCR_VOTING
                                    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


f) Now re-start the crs in exclusive mode


# crsctl stop crs -f
# crsctl start crs -excl -nocrs

[root@oelrac1 trace]# /u01/grid/11.2.0/bin/crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
      1        ONLINE  ONLINE       oelrac1                  Started
ora.cluster_interconnect.haip
      1        ONLINE  ONLINE       oelrac1
ora.crf
      1        OFFLINE OFFLINE
ora.crsd
      1        OFFLINE OFFLINE
ora.cssd
      1        ONLINE  ONLINE       oelrac1
ora.cssdmonitor
      1        ONLINE  ONLINE       oelrac1
ora.ctssd
      1        ONLINE  ONLINE       oelrac1                  ACTIVE:0
ora.diskmon
      1        OFFLINE OFFLINE
ora.evmd
      1        OFFLINE OFFLINE
ora.gipcd
      1        ONLINE  ONLINE       oelrac1
ora.gpnpd
      1        ONLINE  ONLINE       oelrac1
ora.mdnsd
      1        ONLINE  ONLINE       oelrac1
[root@oelrac1 trace]# /u01/grid/11.2.0/bin/crsctl query css votedisk
Located 0 voting disk(s).

[root@oelrac1 trace]# /u01/grid/11.2.0/bin/crsctl replace votedisk +OCR_VOTING
Successful addition of voting disk 3eca999b99794f83bf37adb42833f263.
Successful addition of voting disk 2ed8677861f74f9abf25c98a802d95fe.
Successful addition of voting disk 15f88f5c74ce4f77bf1fd2a3c10e4597.
Successfully replaced voting disk group with +OCR_VOTING.
CRS-4266: Voting file(s) successfully replaced

-- Now restart the cluster fully.

[root@oelrac1 bin]# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.


[root@oelrac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   3eca999b99794f83bf37adb42833f263 (/dev/oracleasm/disks/OCR_VOTE_1) [OCR_VOTING]
 2. ONLINE   2ed8677861f74f9abf25c98a802d95fe (/dev/oracleasm/disks/OCR_VOTE_2) [OCR_VOTING]
 3. ONLINE   15f88f5c74ce4f77bf1fd2a3c10e4597 (/dev/oracleasm/disks/OCR_VOTE_3) [OCR_VOTING]
Located 3 voting disk(s).


[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2828
         Available space (kbytes) :     259292
         ID                       :  516257634
         Device/File Name         : +OCR_VOTING
                                    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



[root@oelrac1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       oelrac1
ora.LISTENER.lsnr
               ONLINE  ONLINE       oelrac1
ora.OCR_VOTING.dg
               ONLINE  ONLINE       oelrac1
ora.asm
               ONLINE  ONLINE       oelrac1                  Started
ora.gsd
               OFFLINE OFFLINE      oelrac1
ora.net1.network
               ONLINE  ONLINE       oelrac1
ora.ons
               ONLINE  ONLINE       oelrac1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       oelrac1
ora.cvu
      1        ONLINE  ONLINE       oelrac1
ora.firstdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown
      2        ONLINE  OFFLINE
ora.oc4j
      1        ONLINE  ONLINE       oelrac1
ora.oelrac1.vip
      1        ONLINE  ONLINE       oelrac1
ora.oelrac2.vip
      1        ONLINE  INTERMEDIATE oelrac1                  FAILED OVER
ora.scan1.vip
      1        ONLINE  ONLINE       oelrac1


================================================================================================================

II) Add one more OCR Mirror Location (upto 4 ocrmirrors can be added)

SQL> set lines 200 pages 200;
SQL> col path for a40;
SQL> select path, header_status from V$asm_disk;

PATH                                     HEADER_STATU
---------------------------------------- ------------
/dev/oracleasm/disks/OCR_MIRR_3          PROVISIONED
/dev/oracleasm/disks/OCR_MIRR_2          PROVISIONED
/dev/oracleasm/disks/OCR_MIRR_1          PROVISIONED

SQL> create diskgroup OCR_MIRROR normal redundancy disk '/dev/oracleasm/disks/OCR_MIRR_1','/dev/oracleasm/disks/OCR_MIRR_2','/dev/oracleasm/disks/OCR_MIRR_3'
    attribute
    'compatible.asm' = '11.2', 'au_size'='4M'
    /



[root@oelrac1 bin]# ./ocrconfig -add +OCR_MIRROR

[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2840
         Available space (kbytes) :     259280
         ID                       :  516257634
         Device/File Name         : +OCR_VOTING
                                    Device/File integrity check succeeded
         Device/File Name         : +OCR_MIRROR
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded



--When votedisk is on ASM diskgroup, no add option available.
The number of votedisk is determined by the diskgroup redundancy. If more copies of votedisks are desired, one can move votedisk to a diskgroup
with higher redundancy.

-- As for the voting disk concerned when the voting disk is placed in asm diskgroup below is the no. of vote
disk base on the redundancy type of the diskgroup.

EXTERNAL - 1 vote disk
NORMAL   - 3 vote disk
HIGH     - 5 vote disk

so there is no add command and only replace can be used for votedisk.

[root@oelrac1 bin]# ./crsctl replace votedisk +OCR_MIRROR
Successful addition of voting disk 5f7d9d544a7b4fa7bf2b2df10f4cd61f.
Successful addition of voting disk 1ca712cdf06a4f5dbf1843f0d98770d1.
Successful addition of voting disk 5afe0a1d5cbe4fc6bf1a8e04c27be20c.
Successful deletion of voting disk 3eca999b99794f83bf37adb42833f263.
Successful deletion of voting disk 2ed8677861f74f9abf25c98a802d95fe.
Successful deletion of voting disk 15f88f5c74ce4f77bf1fd2a3c10e4597.
Successfully replaced voting disk group with +OCR_MIRROR.
CRS-4266: Voting file(s) successfully replaced


[root@oelrac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   5f7d9d544a7b4fa7bf2b2df10f4cd61f (/dev/oracleasm/disks/OCR_MIRR_1) [OCR_MIRROR]
 2. ONLINE   1ca712cdf06a4f5dbf1843f0d98770d1 (/dev/oracleasm/disks/OCR_MIRR_2) [OCR_MIRROR]
 3. ONLINE   5afe0a1d5cbe4fc6bf1a8e04c27be20c (/dev/oracleasm/disks/OCR_MIRR_3) [OCR_MIRROR]
Located 3 voting disk(s).

-- the disks are deleted from the old diskgroup and added to the new diskgroup.

-- Now lets see how the mirror is usefull.


SQL> alter diskgroup ocr_voting dismount force;

Diskgroup altered.




[root@oelrac1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       oelrac1
ora.LISTENER.lsnr
               ONLINE  ONLINE       oelrac1
ora.OCR_MIRROR.dg
               ONLINE  ONLINE       oelrac1
ora.OCR_VOTING.dg
               OFFLINE OFFLINE      oelrac1
ora.asm
               ONLINE  ONLINE       oelrac1                  Started
ora.gsd
               OFFLINE OFFLINE      oelrac1
ora.net1.network
               ONLINE  ONLINE       oelrac1
ora.ons
               ONLINE  ONLINE       oelrac1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       oelrac1
ora.cvu
      1        ONLINE  ONLINE       oelrac1
ora.firstdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown
      2        ONLINE  OFFLINE
ora.oc4j
      1        ONLINE  ONLINE       oelrac1
ora.oelrac1.vip
      1        ONLINE  ONLINE       oelrac1
ora.oelrac2.vip
      1        ONLINE  INTERMEDIATE oelrac1                  FAILED OVER
ora.scan1.vip
      1        ONLINE  ONLINE       oelrac1


-- The OCR_VOTING diskgroup has been dismounted but still the clusterware is online.

--Lets dismount the mirror diskgroup as well.


SQL> alter diskgroup ocr_mirror dismount force;

Diskgroup altered.




[root@oelrac1 bin]# ./crsctl stat res -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.


-- Now the crs is not functional.


SQL> alter diskgroup ocr_mirror mount;

Diskgroup altered.

SQL> alter diskgroup ocr_voting mount;

Diskgroup altered.


[root@oelrac1 bin]# ./crsctl start res ora.crsd -init
CRS-2672: Attempting to start 'ora.crsd' on 'oelrac1'
CRS-2676: Start of 'ora.crsd' on 'oelrac1' succeeded

[root@oelrac1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       oelrac1
ora.LISTENER.lsnr
               ONLINE  ONLINE       oelrac1
ora.OCR_MIRROR.dg
               ONLINE  ONLINE       oelrac1
ora.OCR_VOTING.dg
               ONLINE  ONLINE       oelrac1
ora.asm
               ONLINE  ONLINE       oelrac1                  Started
ora.gsd
               OFFLINE OFFLINE      oelrac1
ora.net1.network
               ONLINE  ONLINE       oelrac1
ora.ons
               ONLINE  ONLINE       oelrac1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       oelrac1
ora.cvu
      1        ONLINE  ONLINE       oelrac1
ora.firstdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown,S
                                                             TARTING
      2        ONLINE  OFFLINE
ora.oc4j
      1        ONLINE  ONLINE       oelrac1
ora.oelrac1.vip
      1        ONLINE  ONLINE       oelrac1
ora.oelrac2.vip
      1        ONLINE  INTERMEDIATE oelrac1                  FAILED OVER
ora.scan1.vip
      1        ONLINE  ONLINE       oelrac1



====================================================================================



III) Remove an OCR Device.
--------------------------

[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2836
         Available space (kbytes) :     259284
         ID                       :  516257634
         Device/File Name         : +OCR_VOTING
                                    Device/File integrity check succeeded
         Device/File Name         : +OCR_MIRROR
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded


-- Lets remove the primary device.


[root@oelrac1 bin]# ./ocrconfig -delete +OCR_VOTING


[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2836
         Available space (kbytes) :     259284
         ID                       :  516257634
         Device/File Name         : +OCR_MIRROR
                                    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



[root@oelrac1 bin]# cat /etc/oracle/ocr.loc
#Device/file +OCR_VOTING getting replaced by device +OCR_MIRROR
ocrconfig_loc=+OCR_MIRROR
local_only=false


-- Could see that the primary has been replaced with mirror one.

-- Lets add the diskgroup back.

[root@oelrac1 bin]# ./ocrconfig -add +OCR_VOTING
[root@oelrac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2836
         Available space (kbytes) :     259284
         ID                       :  516257634
         Device/File Name         : +OCR_MIRROR
                                    Device/File integrity check succeeded
         Device/File Name         : +OCR_VOTING
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded



[root@oelrac1 bin]# cat /etc/oracle/ocr.loc
#Device/file  getting replaced by device +OCR_VOTING
ocrconfig_loc=+OCR_MIRROR
ocrmirrorconfig_loc=+OCR_VOTING
local_only=false


III) Replace or move Existing OCR location to New Location.


Note.
1. An ocrmirror must be in place before trying to replace the OCR device. The ocrconfig will fail
with PROT-16, if there is no ocrmirror exists.
2. If an OCR device is replaced with a device of a different size, the size of the new device will
not be reflected until the clusterware is restarted.

-- ocrconfig -replace +OCR_VOTING -replacement +NEW_OCR_VOTING




-- Voting Disk adminstration.

What happens if I lose my voting disk(s)?

If you lose 1/2 or more of all of your voting disks, then nodes get evicted from the cluster, or nodes kick
themselves out of the cluster. It doesn't threaten database corruption. Alternatively you can use external
redundancy which means you are providing redundancy at the storage level using RAID.
For this reason when using Oracle for the redundancy of your voting disks, Oracle recommends that customers
use 3 or more voting disks in Oracle RAC 10g Release 2. Note: For best availability, the 3 voting files should
be physically separate disks. It is recommended to use an odd number as 4 disks will not be any more highly
available than 3 disks, 1/2 of 3 is 1.5...rounded to 2, 1/2 of 4 is 2, once we lose 2 disks, our cluster will fail
with both 4 voting disks or 3 voting disks.

Restoring corrupted voting disks is easy since there isn't any significant persistent data stored in the voting disk.
See the Oracle Clusterware Admin and Deployment Guide for information on backup and restore of voting disks.

For 11.2+, it is no longer required to back up the voting disk. The voting disk data is automatically backed up in OCR
as part of any configuration change. The voting disk files are backed up automatically by Oracle Clusterware if the
contents of the files have changed in the following ways:

Configuration parameters, for example misscount, have been added or modified
After performing voting disk add or delete operations


Add - When votedisk is on ASM diskgroup, no add option available. The number of votedisk is determined by the
      diskgroup redundancy. If more copies of votedisks are desired, one can move votedisk to a diskgroup
      with higher redundancy.

delete - When votedisk is on ASM, no delete option available, one can only replace the existing votedisk group with another ASM diskgroup.

Move the voting disk- as per below.


[root@oelrac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   5f7d9d544a7b4fa7bf2b2df10f4cd61f (/dev/oracleasm/disks/OCR_MIRR_1) [OCR_MIRROR]
 2. ONLINE   1ca712cdf06a4f5dbf1843f0d98770d1 (/dev/oracleasm/disks/OCR_MIRR_2) [OCR_MIRROR]
 3. ONLINE   5afe0a1d5cbe4fc6bf1a8e04c27be20c (/dev/oracleasm/disks/OCR_MIRR_3) [OCR_MIRROR]
Located 3 voting disk(s).

-- Current location id ocr_mirror diskgroup , lets move it to OCR_VOTING diskgroup, it can be done online.


[root@oelrac1 bin]# ./crsctl replace votedisk +OCR_VOTING
Successful addition of voting disk 85ae96c5a26e4f0cbf35f6dd50cb8765.
Successful addition of voting disk 761064c6565c4f54bfedc332938412f8.
Successful addition of voting disk 8484395588014f8abf7274198aa21b1a.
Successful deletion of voting disk 5f7d9d544a7b4fa7bf2b2df10f4cd61f.
Successful deletion of voting disk 1ca712cdf06a4f5dbf1843f0d98770d1.
Successful deletion of voting disk 5afe0a1d5cbe4fc6bf1a8e04c27be20c.
Successfully replaced voting disk group with +OCR_VOTING.
CRS-4266: Voting file(s) successfully replaced


Related-
How to fix the "DiscoveryString in profile.xml" or "asm_diskstring in ASM" if set wrongly (Doc ID 1077094.1)
NOTE:1376225.1 - How to Modify an Existing ASM Spfile in a RAC Environment
http://www.oracle.com/technetwork/database/clusterware/overview/grid-infra-thirdvoteonnfs-131158.pdf


1 comment: