Introduction to 1.OCR Disks
The problem with forgetfulness is that each node has a copy of the configuration information and the configuration information of the modified node is not synchronized. Oracle's solution is to put this configuration file on the shared storage, which is the OCR Disk. The whole OCR information is tree-shaped structure, mainly divided into 3 major branches. System,database and CRS, respectively. Each branch has a number of small branches, which can only be modified by the root user. OCR is backed up every 4 hours, only 5 files are kept, 3 files are reserved on the same day, one is reserved last week, and one is reserved last month.
The OCR disk content contains:
1). Node information
2). Database instances, nodes, and other mapping relationships
3). RAC Resource configuration information (vip,services)
4). Database Startup related processes
5). CRS per Tri-party application information
2.ocrcheck (check the accessibility of OCR content, view the status of OCR)
[Email protected] ~]$ Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version:3
Total Space (Kbytes): 262120
Used Space (Kbytes): 3140
Available Space (Kbytes): 258980
id:1119662722
Device/file Name: +OCR
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 bypassed due to non-privileged user
[Email protected] ~]$
3.ocrdump (View the contents of the OCR file)
[Email protected] ~]# ll/home/grid/11.2.0/grid/cdata/scan-cluster/
Total 58360
-RW-------1 root root 7462912 Oct 8 18:44 27255153.OCR
-RW-------1 root root 7462912 Oct 14:44 BACKUP00.OCR
-RW-------1 root root 7462912 Oct 9 17:58 BACKUP01.OCR
-RW-------1 root root 7462912 Oct 9 13:58 BACKUP02.OCR
-RW-------1 root root 7462912 Oct 14:45 DAY_.OCR
-RW-------1 root root 7462912 Oct 9 13:58 DAY.OCR
-RW-------1 root root 7462912 Oct 9 17:58 WEEK_.OCR
-RW-------1 root root 7421952 Sep 14:48 WEEK.OCR
[Email protected] ~]#/home/grid/11.2.0/grid/bin/ocrdump-backupfile/home/grid/11.2.0/grid/cdata/scan-cluster/ Backup00.ocr
[[email protected] ~]# ll ocrdumpfile-ocrdumpfile file generated at the current target
-RW-------1 root root 220258 Oct 16:32 ocrdumpfile
[Email protected] ~]# more Ocrdumpfile
10/10/2016 16:32:25
/home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
/home/grid/11.2.0/grid/bin/ocrdump.bin-backupfile/home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
[SYSTEM]
UNDEF:
SECURITY: {user_permission:procr_all_access, Group_permission:procr_read, Other_permission:procr_read, USER_NAME: Root, Group_name:root}
[Email protected] ~]#
4.ocrconfig (Maintain OCR disk)
[Email protected] ~]#/home/grid/11.2.0/grid/bin/ocrconfig-showbackup
Rac1 2016/10/10 14:45:03/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/BACKUP00.OCR
Rac1 2016/10/09 17:58:37/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/BACKUP01.OCR
Rac1 2016/10/09 13:58:33/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/BACKUP02.OCR
Rac1 2016/10/09 13:58:33/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/DAY.OCR
Rac1 2016/09/26 14:48:52/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/WEEK.OCR
[[email protected] ~]#/home/grid/11.2.0/grid/bin/ocrconfig-manualbackup--Enable manual backup
Rac1 2016/10/10 17:44:03/HOME/GRID/11.2.0/GRID/CDATA/SCAN-CLUSTER/BACKUP_20161010_174403.OCR
[Email protected] ~]#/home/grid/11.2.0/grid/bin/ocrconfig-restore/home/grid/11.2.0/grid/cdata/scan-cluster/ BACKUP_20161010_174403.OCR--Recover OCR information
[Email protected] ~]#
5. Manually backing up the OCR disk
[Email protected] ~]#/home/grid/11.2.0/grid/bin/ocrconfig-export/tmp/ocr-20161010.back
[Email protected] ~]# Ll/tmp/ocr-20161010.back
-RW-------1 root root 125185 Oct 17:49/tmp/ocr-20161010.back
[[email protected] ~]#/home/grid/11.2.0/grid/bin/ocrconfig-import/tmp/ocr-20161010.back--The CRS service must be stopped when importing
Introduction to 6.vote Disk disks
Voting disk This file is mainly used to record node member status, in the event of a brain fissure, the decision that partion gain control, the other partion must be removed from the cluster. You will also be prompted to specify this location when you install the RAC. After the installation is complete, you can view the voting disk location by crsctl the query CSS votedisk command. Oracle RAC 10G can be backed up by the DD tool, with the Oracle RAC 11g voting disk and the OCR disk together, You cannot back up with the DD tool.
1). Backup voting disk
DD if=/dev/raw/raw3 of=/tmp/votedisk.back bs=1024m count=10
2). Restore the voting disk
DD if=/tmp/votedisk.back of=/dev/raw/raw3 bs=1024m count=10
This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1860304
Oracle vote disk and OCR disk backup and Recovery