11G下OCR\VOTINGDISK存储位置迁移

原创 2016年05月30日 15:24:37

11G的时候已经不支持裸设备的使用了(OUI已经没有裸设备相关选项,但是仍然可以通过手动方式间接使用),而推荐使用ASM。到12C的时候已经是完全不支持了。


注:Oracle Clusterware 12c does not support the use of raw or block devices. To upgrade to Oracle Clusterware 12c from a previous Oracle Clusterware release on which you were using raw or block devices, you must migrate OCR and voting files to Oracle ASM or a shared file system before you upgrade.


11G RAC默认安装的时候,OCR、VOTEDISK默认存放到DATA磁盘组中了,为了独立出来,考虑新建2个磁盘组,DATAVOTE和DATAOCR。下面是从默认位置迁移到相应位置的过程,记录备用。


[root@node1 bin]# ./ocrconfig -replace +DATA -replacement +DATAOCR
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
[root@node1 bin]# ./oerr prot 28
00028, 0, "Cannot delete or replace the only configured Oracle Cluster Registry location"
// *Cause: A delete or replace operation was performed when there was only 1
//         configured Oracle Cluster Registry location. The above listed
//         operation can only be performed when there are at least 2 configured
//         Oracle Cluster Registry locations.
// *Action: Execute 'ocrconfig -add <new location>' to add the new Oracle
//          Cluster Registry location followed by
//          'ocrconfig -delete <existing location>' command.




[root@node1 bin]# ./ocrconfig -add +DATAOCR
PROT-30: The Oracle Cluster Registry location to be added is not usable
PROC-50: The Oracle Cluster Registry location to be added is inaccessible on nodes node2.


从上述信息来看应该添加失败。
[root@node1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          3
Total space (kbytes)     :     262120
Used space (kbytes)      :       2856
Available space (kbytes) :     259264
ID                       :  387273031
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
果然只有DATA

[root@node1 bin]# ./oerr proc 50
00050,1, "The Oracle Cluster Registry location to be added is inaccessible on nodes %s."
// *Cause: The Oracle Cluster Registry location to be added did not exist,
//         was not mounted correctly or did not have the required permissions
//         on the above listed nodes.
// *Action: Ensure that the location exists with appropriate permissions on the
//          above listed nodes. If the location is an ASM disk group, the
//          disk group must be mounted correctly; also check the entries in the
//          ASM alert log file for more details.


节点2果然没有mount
[grid@node2 bin]$ ./sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 30 14:32:18 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select name,state from v$asm_diskgroup;
NAME       STATE
------------------------------ -----------
DATA       MOUNTED
DATAVOTE       DISMOUNTED
DATAOCR       DISMOUNTED

SQL> alter diskgroup dataocr mount;
Diskgroup altered.
SQL> alter diskgroup datavote mount;
Diskgroup altered.
SQL> select name,state from v$asm_diskgroup;
NAME       STATE
------------------------------ -----------
DATA       MOUNTED
DATAVOTE       MOUNTED
DATAOCR       MOUNTED




重新添加一次:


[root@node1 bin]# ./ocrconfig -add +dataocr
PROT-30: The Oracle Cluster Registry location to be added is not usable
PROC-8: Cannot perform cluster registry operation because one of the parameters is invalid.
ORA-15056: additional error message
ORA-17502: ksfdcre:4 Failed to create file +DATAOCR.255.1
ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher
ORA-06512: at line 4

居然还报错,这里应该是说创建ocr配置文件的时候,所使用的asm磁盘组的兼容性属性的版本太旧。
眼见为实:
  1* SELECT group_number, name, compatibility, database_compatibility FROM v$asm_diskgroup
SQL> /

GROUP_NUMBER NAME COMPATIBILITYDATABASE_COMPAT
------------ -------------------------------------------------- --------------- ---------------
  1 DATA 11.2.0.0.0 10.1.0.0.0
  2 DATAVOTE 10.1.0.0.0 10.1.0.0.0
  3 DATAOCR 10.1.0.0.0 10.1.0.0.0
果然低于最低要求的11.1.0.0.0。修改之。

SQL> ALTER DISKGROUP DATAOCR SET ATTRIBUTE 'compatible.asm' = '11.2';
ALTER DISKGROUP DATAOCR SET ATTRIBUTE 'compatible.rdbms' = '10.1';
Diskgroup altered.
SQL> 
Diskgroup altered.
SQL> SQL> 
ALTER DISKGROUP datavote SET ATTRIBUTE 'compatible.asm' = '11.2';
ALTER DISKGROUP datavote SET ATTRIBUTE 'compatible.rdbms' = '10.1';SQL> 
Diskgroup altered.
SQL> 
Diskgroup altered.
SQL> SQL> 
SQL> SELECT group_number, name, compatibility, database_compatibility FROM v$asm_diskgroup;
GROUP_NUMBER NAME COMPATIBILITYDATABASE_COMPAT
------------ -------------------------------------------------- --------------- ---------------
  1 DATA 11.2.0.0.0 10.1.0.0.0
  2 DATAVOTE 11.2.0.0.0 10.1.0.0.0
  3 DATAOCR 11.2.0.0.0 10.1.0.0.0

再次添加:

[root@node1 bin]# ./ocrconfig -add +dataocr
[root@node1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          3
Total space (kbytes)     :     262120
Used space (kbytes)      :       2848
Available space (kbytes) :     259272
ID                       :  387273031
Device/File Name         :      +DATA
                                    Device/File integrity check succeeded
Device/File Name         :   +dataocr
                                    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

再次迁移ocr的现有位置
[root@node1 bin]# ./ocrconfig -replace +DATA -replacement +DATAOCR
PROT-29: The Oracle Cluster Registry location is already configured
[root@node1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          3
Total space (kbytes)     :     262120
Used space (kbytes)      :       2848
Available space (kbytes) :     259272
ID                       :  387273031
Device/File Name         :      +DATA
                                    Device/File integrity check succeeded
Device/File Name         :   +dataocr
                                    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@node1 bin]# ./ocrconfig -delete +DATA
[root@node1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          3
Total space (kbytes)     :     262120
Used space (kbytes)      :       2848
Available space (kbytes) :     259272
ID                       :  387273031
Device/File Name         :   +dataocr
                                    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

至此OCR迁移完毕。


[root@node1 bin]# ./crsctl replace votedisk +datavote
Successful addition of voting disk a3f5c0a489374f17bf9abc0bc862e985.
Successful deletion of voting disk 4be6cc3ea3cf4f60bf5b05cbe662a3ee.
Successfully replaced voting disk group with +datavote.
CRS-4266: Voting file(s) successfully replaced
[root@node1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   a3f5c0a489374f17bf9abc0bc862e985 (/dev/asm-vote) [DATAVOTE]
Located 1 voting disk(s).

至此VOTEDISK迁移完毕。


版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

添加磁盘组存储OCR数据报错

[root@rac2 bin]# ./ocrconfig -add +OCR_DATA PROT-30: The Oracle Cluster Registry location to be adde...

迁移OCR、表决磁盘和asm spfile到其他磁盘组中

本文参考:https://levipereira.wordpress.com/2012/01/11/explaining-how-to-store-ocr-voting-disks-and-asm-s...

11g 如何添加,替换,移除,迁移 OCR ?

11g 如何添加,替换,移除,迁移 OCR ? 如何通过本地文件查看OCR存放位置。 [root@node2 oracle]# cat /etc/oracle/ocr.loc #Device/fi...

Oracle 12c RAC 替换 OCR 磁盘组操作步骤

注:本文谢绝转载!  为方便以后的测试,整了一套新的测试环境,600G PCIe 闪存卡+8核CPU+16G内存。  把整个虚拟机从我的电脑上直接copy 过去,网络什么都没问题,但是RAC 的共享设...

Oracle 10g RAC OCR 和 VotingDisk 的备份与恢复

一.  Voting Disk Voting Disk 这个文件主要用于记录节点成员状态,在出现脑裂时,决定那个Partion获得控制权,其他的Partion必须从集群中剔除。Voting disk...

RAC ocr和votingdisk文件损坏恢复

rac+asm ocr文件和votingdisk文件损坏恢复 1、ocr自动备份与恢复方法 1) 自动备份 oracle会每小时备份一次ocr,自动备份的默认路径是:$CRS_HOME/cdat...
  • RuleV5
  • RuleV5
  • 2011-12-06 10:33
  • 3491

【oracle11g,18】存储结构:临时表,手工条带化,表/索引迁移表空间,删除表,外部表

【oracle11g,18】存储结构:临时表,手工条带化,表/索引迁移表空间,删除表,外部表

Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]

Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1] ...

oracle 11g改变控制文件的位置

控制文件是oracle数据库中一个非常小的二进制文件,它含有数据库的结构信息。无论是启动数据库还是在数据库运行的过程中,控制文件都起着非常重要的作用。下面用两种方法介绍如何移动控制文件的位置。

oracle11gRAC votingdisk全部丢失处理

环境:oracle linux 6.7+oracle11.2.0.4 RAC 因在存储上误操作仲裁盘全部丢失,从而导致rac数据库崩溃无法再启动。 1、现象 fdisk以及multipath中无...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)