ITPub博客

首页 > 数据库 > Oracle > 11G开始voting disk自动备份到OCR了,也就是说voting disk信息合并到OCR中了

11G开始voting disk自动备份到OCR了,也就是说voting disk信息合并到OCR中了

原创 Oracle 作者:lusklusklusk 时间:2018-11-01 16:33:31 0 删除 编辑

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 . If all voting disks are corrupted, however, you can restore them as described in "Restoring Voting Disks".

在Oracle Clusterware 11g第2版( 11.2)中,您不再需要备份voting disk。 作为任何配置更改的一部分,voting disk数据将自动备份到OCR中,并自动还原到添加的任何voting disk 。 但是,如果所有voting disk都已损坏,则可以按照“Restoring Voting Disks”中的说明进行还原。


安装GRID软件的时候,需要一个DISKGROUP,这个DISKGROUP就是存放OCR和ASM的spfile的,一般这个DISKGROUP专门给到OCR和ASM用,不要放DB的数据文件,这个DISKGROUP撑死10G空间就够了


voting disk

A file that manages information about node membership.

管理节点成员资格信息的文件。


Oracle Cluster Registry (OCR)

The Oracle RAC configuration information repository that manages information about the cluster node list and instance-to-node mapping information. OCR also manages information about Oracle Clusterware resource profiles for customized applications.

Oracle RAC配置信息存储库,用于管理有关群集节点列表和实例到节点映射信息的信息。 OCR还管理有关自定义应用程序的Oracle Clusterware资源配置文件的信息。



检查、新增、替换votedisk信息

crsctl query css votedisk

crsctl add css votedisk /sharednfs/vote2

crsctl replace votedisk +DATA


ocrdump

ocrconfig -export逻辑导出的dump打开是乱码,所以如果要查看OCR的内容,只能使用ocrdump

将OCR文件内容写入/home/grid/FILE1文件

ocrdump /home/grid/FILE1


[grid@plmdbb ~]$ crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   4f65321d62a84fa3bf3c652a155a57ee (/dev/plm_db_data) [DATA]

Located 1 voting disk(s).


下面为ASM的spfile文件

ASMCMD> ls +DATA/plmdb-cluster/ASMPARAMETERFILE/

REGISTRY.253.947607045


下面为OCR文件

ASMCMD> ls  +DATA/plmdb-cluster/OCRFILE/

REGISTRY.255.947607047


[grid@plmdbb ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       2896

         Available space (kbytes) :     259224

         ID                       :  129709744

         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 bypassed due to non-privileged user


[grid@plmdbb ~]$ ocrcheck -config

Oracle Cluster Registry configuration is :

         Device/File Name         :      +DATA


[grid@plmdbb ~]$ ocrconfig -showbackup

plmdba     2018/11/01 11:25:13     /u01/app/11.2.0/grid/cdata/plmdb-cluster/backup00.ocr

plmdba     2018/11/01 07:25:13     /u01/app/11.2.0/grid/cdata/plmdb-cluster/backup01.ocr

plmdba     2018/11/01 03:25:13     /u01/app/11.2.0/grid/cdata/plmdb-cluster/backup02.ocr

plmdba     2018/10/30 19:25:11     /u01/app/11.2.0/grid/cdata/plmdb-cluster/day.ocr

plmdba     2018/10/21 15:24:52     /u01/app/11.2.0/grid/cdata/plmdb-cluster/week.ocr

PROT-25: Manual backups for the Oracle Cluster Registry are not available





Restoring Voting Disks

If all of the voting disks are corrupted, then you can restore them, as follows:

1、Restore OCR as described in "Restoring Oracle Cluster Registry", if necessary.

This step is necessary only if OCR is also corrupted or otherwise unavailable, such as if OCR is on Oracle ASM and the disk group is no longer available.


2、Run the following command as root from only one node to start the Oracle Clusterware stack in exclusive mode, which does not require voting files to be present or usable:

# crsctl start crs -excl


3、Run the crsctl query css votedisk command to retrieve the list of voting files currently defined, similar to the following:

This list may be empty if all voting disks were corrupted, or may have entries that are marked as status 3 or OFF.

$ crsctl query css votedisk

--  -----    -----------------                --------- ---------

##  STATE    File Universal Id                File Name Disk group

 1. ONLINE   7c54856e98474f61bf349401e7c9fb95 (/dev/sdb1) [DATA]


4、Depending on where you store your voting files, do one of the following:

4.1、If the voting disks are stored in Oracle ASM, then run the following command to migrate the voting disks to the Oracle ASM disk group you specify:

The Oracle ASM disk group to which you migrate the voting files must exist in Oracle ASM. You can use this command whether the voting disks were stored in Oracle ASM or some other storage device.

crsctl replace votedisk +asm_disk_group

4.2、If you did not store voting disks in Oracle ASM, then run the following command using the File Universal Identifier (FUID) obtained in the previous step:

$ crsctl delete css votedisk FUID

Add a voting disk, as follows:

$ crsctl add css votedisk path_to_voting_disk


5、Stop the Oracle Clusterware stack as root:

If the Oracle Clusterware stack is running in exclusive mode, then use the -f option to force the shutdown of the stack.

# crsctl stop crs


6、Restart the Oracle Clusterware stack in normal mode as root:

# crsctl start crs

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2218401/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Welcome to Lukes DB HOME。11G OCM, 5年以上DBA工作经验,博客仅记录自己的一个学习过程,不代表完全准确,如有需要,欢迎转载。

注册时间:2015-02-02

  • 博文量
    345
  • 访问量
    331458