Monday, May 21, 2018

Maintenance of OCR and Voting Disk

OCR

1. Stop Oracle Clusterware
[root@ol5-112-rac1 ~]# crsctl stop crs
2. Start Oracle Clusterware
[root@ol5-112-rac1 ~]# crsctl start crs
3. Start Oracle Clusterware
[root@ol5-112-rac1 ~]# crsctl check crs

CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS 4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
4. To find the backup
[root@ol5-112-rac1 ~]# ocrconfig -showbackup

ol5-112-rac2     2018/05/12 07:33:50     /u01/app/11.2.0/grid/cdata/ol5-112-scan/backup00.ocr
5. To Perform manual backup
[root@ol5-112-rac1 ~]# ocrconfig -manualbackup
6. To find the Manual backup only
[root@ol5-112-rac1 ~]# ocrconfig -showbackup manual

ol5-112-rac2     2018/05/12 07:33:50     /u01/app/11.2.0/grid/cdata/ol5-112-scan/backup_183340.ocr
7. Change OCR backup location
[root@ol5-112-rac1 ~]# ocrconfig -backuploc /home/oracle
8. Review its contents
[root@ol5-112-rac1 bin]# ocrdump -backupfile backup00.ocr
9. Restore the physical OCR backup
[root@ol5-112-rac1 ~]# crsctl stop crs
[root@ol5-112-rac1 ~]# ocrconfig -restore /u01/app/11.2.0/grid/cdata/ol5-112-scan/backup00.ocr
[root@ol5-112-rac1 ~]# crsctl start crs
10. Check Existing OCR Detail
[root@ol5-112-rac1 ol5-112-scan]# ocrcheck

Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2788
         Available space (kbytes) :     259332
         ID                       : 1488879956
         Device/File Name         :      +DATA
                                    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
11. Check OCR integrity
[oracle@ol5-112-rac1 ~]$ cluvfy comp ocr -n all

Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations
ASM Running check passed. ASM is running on all cluster nodes
Checking OCR config file "/etc/oracle/ocr.loc"...
OCR config file "/etc/oracle/ocr.loc" check successful
Disk group for ocr location "+DATA" available on all the nodes
Checking size of the OCR location "+DATA" ...
Size check for OCR location "+DATA" successful...
OCR integrity check passed
Verification of OCR integrity was unsuccessful on all the specified nodes.

Voting Disk

1. Check existing Voting Disk
[root@ol5-112-rac1 ~]# crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   5d89f9b9a2d24f6cbfed2335d94877ed (/dev/oracleasm/disks/DISK1) [DATA]
2. Add voting disk
[root@ol5-112-rac1 ~]# crsctl add votedisk /dev/oracleasm/disks/DISK2
3. Delete voting disk
[root@ol5-112-rac1 ~]# crsctl add votedisk /dev/oracleasm/disks/DISK2