`

Moving OCR and Voting Disk to Oracle ASM Online

 
阅读更多

Prior Oracle 11gR2, it was only possible to the OCR and Voting Disk files in multiple raw devices, shared between the nodes of a cluster.
From this version on, it’s very interesting to take the advantages and capabilities of ASM (striping and mirror) to store those files.
To store the OCR and Voting Disk files on a diskgroup, you must obey the following rules:
    If your diskgroup has “external” redundancy, it must have at least one disk associated.
    If your diskgroup has “normal” redundancy, it must have at least 3 disks associated, even though it can be create diskgroup with only 2 disks.
    If your diskgroup has “high” redundancy, it must have at least 5 disks associated, even though it can be create diskgroup with only 3 disks.
In this article, I will use the second option, normal redundancy. As in my server there are only 2 disks available for the diskgroup, I asked to the storage team to add another 1 GB disk:
[root@orarac01 ~]# /etc/init.d/oracleasm listdisks
DATA01
OCRVOTE01
OCRVOTE02
The disk has already been available:
[root@orarac01 ~]# multipath -ll
DATA01 (36000c29ab0accd959da8f1f78dd2de2f) dm-4 VMware,Virtual disk
size=300G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  `- 3:0:2:0 sde 8:64 active ready running
OCRVOTE03 (36000c299550e110b041c9ab26acd33ac) dm-5 VMware,Virtual disk
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  `- 3:0:3:0 sdf 8:80 active ready running
OCRVOTE02 (36000c29b67329567f6a6547d6fd3c769) dm-2 VMware,Virtual disk
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  `- 3:0:0:0 sdc 8:32 active ready running
OCRVOTE01 (36000c29c1a57ee047d443991ef48894a) dm-3 VMware,Virtual disk
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  `- 3:0:1:0 sdd 8:48 active ready running
Adding a new disk to oracleasm:
[root@orarac01 ~]# /etc/init.d/oracleasm createdisk OCRVOTE03 /dev/dm-5
Marking disk "OCRVOTE03" as an ASM disk:                   [  OK  ]
[root@orarac01 ~]# /etc/init.d/oracleasm listdisks
DATA01
OCRVOTE01
OCRVOTE02
OCRVOTE03
Enabling disk on another RAC node:
[root@orarac02 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@orarac02 ~]# /etc/init.d/oracleasm listdisks
DATA01
OCRVOTE01
OCRVOTE02
OCRVOTE03
[root@orarac02 ~]#
The next step is to create the new ASM diskgroup
First, let’s try to put them as “High Redundancy” and see what happens.
CREATE DISKGROUP OCRVOTE HIGH REDUNDANCY
FAILGROUP OCRVOTE_FG01 DISK '/dev/oracleasm/disks/OCRVOTE01' NAME OCRVOTE01  SIZE 1024M
FAILGROUP OCRVOTE_FG02 DISK '/dev/oracleasm/disks/OCRVOTE02' NAME OCRVOTE02  SIZE 1024M
FAILGROUP OCRVOTE_FG03 DISK '/dev/oracleasm/disks/OCRVOTE03' NAME OCRVOTE03  SIZE 1024M
ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='1M';
[root@orarac01 ~]# crsctl replace votedisk +OCRVOTE
Failed to create voting files on disk group OCRVOTE.
Change to configuration failed, but was successfully rolled back.
CRS-4000: Command Replace failed, or completed with errors.
[root@orarac01 ~]# tail -n 200 $GRID_HOME/log/orarac01/client/crsctl_root.log
...
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: === clsssConfigLock ===
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: lock(0x2838a50), version(1), size(1088)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: offsets(24), activever(186647296)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: id(15), instantiation(5), incarn(1)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: mapoff(28), configoff(548), mapsize(512)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: state(10), holders(1), waiters(0)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: committimestamp(0), commitstate(0)
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: === Map (of first 7 entries) ===
2013-06-18 11:46:13.220: [ CSSCLNT][278546160]clsssConfigLockTrace: 010 000 000 000 000 000 000
2013-06-18 11:46:13.221: [  CRSCTL][278546160]crsctl_replace_votedisk: calling kgfdvfPushDiskString
2013-06-18 11:46:13.397: [  CRSCTL][278546160]function crsctl_replace_votedisk, error 1 [clsuSlosFormatDiag called with non-error slos.]
.
 
2013-06-18 11:46:13.397: [  CRSCTL][278546160]crsctl_replace_votedisk: pushed the ASM DS to the profile 1
[   CLWAL][278546160]clsw_Initialize: OLR initlevel [30000]
2013-06-18 11:46:13.432: [  CRSCTL][278546160]crsctl_format_diskgroup: creating diskgroup OCRVOTE
2013-06-18 11:46:16.555: [  CRSCTL][278546160]function crsctl_format_diskgroup, error 1 SLOS: cat=-1, opn=(none), dep=(none), loc=ORA-01405: f
.
 
2013-06-18 11:46:16.555: [  CRSCTL][278546160]crsctl_format_diskgroup: diskgroup OCRVOTE creation with status 1. Please check the alert log file for ASM
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: === clsssConfigUnlock ===
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: lock(0x2837b50), version(1), size(1088)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: offsets(24), activever(186647296)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: id(15), instantiation(5), incarn(3)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: mapoff(28), configoff(548), mapsize(512)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: state(0), holders(0), waiters(0)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: committimestamp(0), commitstate(0)
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: === Map (of first 7 entries) ===
2013-06-18 11:46:16.568: [ CSSCLNT][278546160]clsssConfigLockTrace: 000 000 000 000 000 000 000
...
[root@orarac01 ~]# tail -n 500 /u01/app/grid/diag/asm/+asm/+ASM1/trace/alert_+ASM1.log
...
Tue Jun 18 11:46:13 2013
NOTE: Creating voting files in diskgroup OCRVOTE
Tue Jun 18 11:46:13 2013
NOTE: Voting File refresh pending for group 2/0x7f386577 (OCRVOTE)
NOTE: Attempting voting file creation in diskgroup OCRVOTE
NOTE: voting file allocation on grp 2 disk OCRVOTE_0000
NOTE: voting file allocation on grp 2 disk OCRVOTE_0001
NOTE: voting file allocation on grp 2 disk OCRVOTE_0002
ERROR: Voting file allocation failed for group OCRVOTE
Errors in file /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_6301.trc:
ORA-15274: Not enough failgroups (5) to create voting files
NOTE: Attempting voting file refresh on diskgroup OCRVOTE
NOTE: Voting file relocation is required in diskgroup OCRVOTE
NOTE: Attempting voting file relocation on diskgroup OCRVOTE
NOTE: voting file deletion on grp 2 disk OCRVOTE_0000
NOTE: voting file deletion on grp 2 disk OCRVOTE_0001
NOTE: voting file deletion on grp 2 disk OCRVOTE_0002
...
The error is that it is necessary at least 5 failgroups to create the Voting Disk.
We will then recreate them with the correct redundancy:
CREATE DISKGROUP OCRVOTE NORMAL REDUNDANCY
FAILGROUP OCRVOTE_FG01 DISK '/dev/oracleasm/disks/OCRVOTE01' NAME OCRVOTE01  SIZE 1024M
FAILGROUP OCRVOTE_FG02 DISK '/dev/oracleasm/disks/OCRVOTE02' NAME OCRVOTE02  SIZE 1024M
FAILGROUP OCRVOTE_FG03 DISK '/dev/oracleasm/disks/OCRVOTE03' NAME OCRVOTE03  SIZE 1024M
ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='1M';
   
[root@orarac01 ~]# crsctl replace votedisk +OCRVOTE
Successful addition of voting disk 05ca1320e3244f70bf45d1fc37d325d5.
Successful addition of voting disk 1affc0b6da314fe8bfd8dec18af4923b.
Successful addition of voting disk 3d87bf2793e04fe4bfd6764f24ffafb1.
Successful deletion of voting disk 4c9ddcb1acd14f27bf77652370a1a5b1.
Successfully replaced voting disk group with +OCRVOTE.
CRS-4266: Voting file(s) successfully replaced
[root@orarac01 ~]# crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
1. ONLINE   05ca1320e3244f70bf45d1fc37d325d5 (/dev/oracleasm/disks/OCRVOTE01) [OCRVOTE]
2. ONLINE   1affc0b6da314fe8bfd8dec18af4923b (/dev/oracleasm/disks/OCRVOTE02) [OCRVOTE]
3. ONLINE   3d87bf2793e04fe4bfd6764f24ffafb1 (/dev/oracleasm/disks/OCRVOTE03) [OCRVOTE]
Located 3 voting disk(s).
The Voting Disk step is done.
The next step is the CRS. Note that we are transferring him from another diskgroup (+DATA), which is used to store datafiles, to this another diskgroup recently created:
[root@orarac01 ~]# ocrconfig -replace +DATA -replacement +OCRVOTE
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
As we have only one OCR location configured, the “replace” command doesn’t work. We’ll need to add another one and delete the old:
[root@orarac01 ~]# ocrconfig -add +OCRVOTE
[root@orarac01 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2836
         Available space (kbytes) :     259284
         ID                       : 1089167638
         Device/File Name         :      +DATA
                                    Device/File integrity check succeeded
         Device/File Name         :   +OCRVOTE
                                    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
Now erase the old:
   
[root@orarac01 ~]# ocrconfig -delete +DATA
[root@orarac01 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2836
         Available space (kbytes) :     259284
         ID                       : 1089167638
         Device/File Name         :   +OCRVOTE
                                    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@orarac01 ~]# cat /etc/oracle/ocr.loc
#Device/file +DATA getting replaced by device +OCRVOTE
ocrconfig_loc=+OCRVOTE
local_only=false

Done!

参考至:http://www.dbarj.com.br/en/2013/06/moving-ocr-voting-disk-to-oracle-asm-online/
如有错误,欢迎指正
邮箱:czmcj@163.com

分享到:
评论

相关推荐

    Oracle RAC 11gR2日常维护管理之OCR和VotingDisk维护.pdf

    Oracle RAC 11gR2中引入的新特性包括:OCR和Voting Disk都放置在ASM磁盘组中,本地注册表OLR(OCR Location Registration)用于存储集群中每个节点的OCR配置信息。这样的设计不仅可以优化集群的管理,还能加快节点...

    Oracle 11.2.0.3 RAC 重建 OCR 和 Voting Disk 案例

    Oracle Cluster Registry (OCR) 和 Voting Disks 是RAC环境中至关重要的组件,用于存储集群配置信息和实现节点间的共识。本案例将详细介绍在Oracle 11.2.0.3版本中如何重建OCR和Voting Disks。 OCR(Oracle Cluster...

    Oracle_RAC_CRS、OCR、Voting破坏重建

    Oracle RAC 集群中,CRS(Clusterware)、OCR(Oracle Cluster Registry)和 Voting Disk 是三个关键组件。CRS 负责集群的管理和监控,OCR 负责存储集群的配置信息,而 Voting Disk 则是用来确保集群的高可用性。...

    Oracle 10G RAC下OCR和Voting disk的管理

    ### Oracle 10G RAC 下 OCR 和 Voting Disk 的管理 #### 一、Voting Disk (表决磁盘)管理 **定义与作用** 在Oracle 10g RAC环境中,Voting Disk(表决磁盘)主要用于记录集群中的成员信息,包括当前有哪些节点参与...

    【故障】RAC ASM磁盘路径故障导致OCR和Voting Disk被Force Dismount

    然而,当RAC中的ASM磁盘路径出现故障时,可能会导致OCR(Oracle Cluster Registry)和Voting Disk被Force Dismount,这是一个严重的故障情况,可能影响到整个集群的稳定性。 OCR是RAC中的关键组件,存储了集群的...

    voting disk破坏后的恢复

    ### Oracle RAC Voting Disk破坏后的恢复 在Oracle Real Application Clusters (RAC)环境中,Voting Disk(表决磁盘)是集群同步的关键组件之一。它主要用于集群节点间的选举过程,确保集群的一致性和高可用性。当...

    ORACLE ASM添加磁盘操作步骤

    对于高可用性环境来说,备份和恢复Oracle Cluster Registry (OCR) 文件以及Voting disk是非常重要的,这有助于在集群故障后快速恢复服务。 ##### 8.3 ASM元数据备份与修复 定期备份ASM的元数据,并掌握如何在必要时...

    oracle备份文件恢复ocr和voting

    在Oracle数据库管理中,OCR(Oracle Cluster Registry)和投票文件(voting files)是确保集群稳定性与数据高可用性的关键组件。OCR存储集群的配置信息,包括实例、数据库和网络配置,而投票文件则用于集群节点间的...

    oracle数据库安装rac需要的oracleasm的软件包

    5. **配置OCR(Oracle Cluster Registry)和Voting Disks**:OCR存储集群的配置信息,Voting Disks则用于集群节点间的仲裁。这两者都可以存储在ASM磁盘组中。 6. **安装Oracle数据库软件**:在Oracle Grid ...

    Oracle-11g-R2-RAC-with-ASM存储迁移-手记.docx

    7.Oracle 11g R2 RAC 的存储架构:Oracle 11g R2 RAC 的存储架构主要包括 ASM 磁盘组、OCR、Voting Disk 和数据库文件等几个部分,ASM 磁盘组可以提供高可用的存储服务。 8.迁移数据库参数文件:在迁移过程中,需要...

    Linux 6.4 安装Oracle 11g rac oracleasm的三个包

    配置OracleASM涉及创建ASM实例、设置OCR(Oracle Cluster Registry)和 Voting Disks。OCR用于存储集群配置信息,Voting Disks则用于集群节点间的故障检测和决策。 5. **创建ASM磁盘组** 在安装过程中,你需要...

    oracle rac asm包

    6. 使用OCR(Oracle Cluster Registry)和Voting Disks来设置集群通信和选举机制。 7. 配置网络,包括私有网络(Interconnect)和公共网络,确保节点间的通信和客户端访问。 8. 最后,启动数据库实例,并进行必要的...

    rhel6系统oracleasm安装包

    安装过程中会要求设置ASM实例、OCR(Oracle Cluster Registry)和Voting Disks的位置。 3. **创建ASM磁盘组**: 安装完成后,需要创建ASM磁盘组来存储数据库文件。使用` asmcmd`命令行工具或者通过SQL*Plus连接到...

    Redhat AS4 Oracle10g+ASM单实例转RAC

    4. 创建OCR和Voting Disks:在ASM中创建OCR和Voting Disks,用于存储集群配置信息和选举主节点。 5. 初始化参数调整:修改数据库的初始化参数文件,适应RAC环境,如SGA分配、后台进程等。 6. 配置Listener和Net...

    oracle11g r2+asm

    这个过程包括安装OCR(Oracle Cluster Registry)和 Voting Disks,以及ASM实例。之后,可以安装数据库软件,配置数据库实例,并将数据文件存储在ASM中。 ASM的使用带来了诸多好处,如自动磁盘管理、冗余和故障恢复...

    Oracle 11gR2 RAC + ASM on AIX-6.1安装指导手册

    Oracle 11gR2 RAC (Real Application Clusters) 和 ASM (Automatic Storage Management) 是在AIX-6.1操作系统上部署企业级数据库环境的关键组件。本安装指南将涵盖预安装检查、规划以及安装过程中的重要步骤。 1. ...

    Oracle RAC 资料收集日常基本维护命令

    ASM instance +ASM1 is running on node linux1. ``` 5. **列出配置的所有数据库**: ```bash $ srvctl config database ``` 输出示例: ```plaintext orcl ``` 6. **显示RAC数据库的配置**: ```bash ...

    centos6 asm依赖包

    它还包含OCR(Oracle Configuration Manager)和Voting Disks,用于集群的高可用性。 在压缩包"centos6asm"中,可能包含了这些必要的依赖包和步骤指南。解压后,按照提供的说明进行操作,例如: 1. **安装预安装包...

    Oracle10g RAC ASM 环境日常管理命令

    投票盘(Voting Disk)和OCR(Oracle Cluster Registry)是RAC集群中至关重要的共享存储区域,用于存储集群的配置信息和元数据。定期备份这些组件是防止数据丢失的关键策略。使用`dd`命令可以创建这些文件系统的备份...

Global site tag (gtag.js) - Google Analytics