ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

oracle 11g ocr 冗余配置

oracle 11g ocr 冗余配置 在11g 安装过程中默认仅仅能指定一个 dg 用来存储crs voting可是oracle 官方一般建议我们这么来配置1、当ocr没有配置镜像。或者冗余存储时 最少3个ocr 。假设底层存储不是RAID的话oracle建议镜像OCR镜像能够避免单点故障。■ At least two OCR locations if OCR is configured on an Oracle ASM disk group.You should configure OCR in two independent disk groups. Typically this is thework area and the recovery area.2、假设ocr 配置在oracle asm disk group上时建议最少两个ocr 位置ocr 应当配置在两个单独的 disk group■ At least two OCR locations if OCR is configured on mirrored hardware orthird-party mirrored volumes.3、假设ocr 配置在有镜像的硬件或者在第3方的镜像卷上时也建议最少冗余2个ocreg加入多个ocr 最多5个ocrconfig -add asm_disk_group| file_nameocrconfig -delete ASM_disk_group| file_name[rootvmrac1 ~]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 ~]# ocrconfig -add ARCH --------------------------加入一个新的ocr ARCH[rootvmrac1 ~]# ocrcheck ------------------------------检查后已经成功加入Status of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : ARCHDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded同理再加入几个 dg[rootvmrac1 ~]# ocrconfig -add DATANEW[rootvmrac1 ~]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : ARCHDevice/File integrity check succeededDevice/File Name : DATANEWDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 ~]# ocrconfig -add FLASH[rootvmrac1 ~]# orcheck-bash: orcheck: command not found[rootvmrac1 ~]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : ARCHDevice/File integrity check succeededDevice/File Name : DATANEWDevice/File integrity check succeededDevice/File Name : FLASHDevice/File integrity check succeededDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 ~]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : ARCHDevice/File integrity check succeededDevice/File Name : DATANEWDevice/File integrity check succeededDevice/File Name : FLASHDevice/File integrity check succeededDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 ~]# ocrcheck -localStatus of Oracle Local Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 2728Available space (kbytes) : 259392ID : 935756415Device/File Name : /u02/app/11.2.0.3/grid/cdata/vmrac1.olrDevice/File integrity check succeededLocal registry integrity check succeededLogical corruption check succeeded------------这里我们再来看下ocr 的配置信息 。配置文件在Linux环境下位于 /etc/oracle/ocr.loc[rootvmrac1 ~]# cd /etc/oracle[rootvmrac1 oracle]# lslastgasp ocr.loc ocr.loc.orig olr.loc olr.loc.bkp olr.loc.orig oprocd scls_scr setasmgid[rootvmrac1 oracle]# more ocr.loc#Device/file getting replaced by device FLASHocrconfig_locCRSocrmirrorconfig_locARCH ----------新加入的 ocr 镜像组ocrconfig_loc3DATANEWocrconfig_loc4FLASHlocal_onlyfalse[rootvmrac1 oracle]# more olr.locolrconfig_loc/u02/app/11.2.0.3/grid/cdata/vmrac1.olrcrs_home/u02/app/11.2.0.3/grid-----------这里处理加入新的ocr外我们也能够替换老的 ocr dg[rootvmrac1 oracle]# ocrconfig -replace ARCH -replacement FLASH[rootvmrac1 oracle]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : FLASHDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 oracle]# ocrconfig -replace FLASH -replacement ARCH[rootvmrac1 oracle]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File Name : ARCHDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 oracle]#---------------------注意当 仅仅有一个 ocr dg 时以上命令会报错[rootvmrac1 oracle]# ocrcheckStatus of Oracle Cluster Registry is as follows :Version : 3Total space (kbytes) : 262120Used space (kbytes) : 3540Available space (kbytes) : 258580ID : 1902812549Device/File Name : CRSDevice/File integrity check succeededDevice/File not configuredDevice/File not configuredDevice/File not configuredDevice/File not configuredCluster registry integrity check succeededLogical corruption check succeeded[rootvmrac1 oracle]# ocrconfig -replace CRS -replacement ARCHPROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location[rootvmrac1 oracle]#正确做法假设当前的ocr 少于2个 则上述ocr 的替换命令会出错假设仅仅有一个ocr 时我们能够先加入一个ocr 。再删除原来的ocr# ocrconfig -add new_OCR_location# ocrconfig -delete current_OCR_location
返回列表