asm如何更换ocr新磁盘组
测试如下,安装grid选择的四块100g的磁盘组命名为+DATA
创建了三块1g的用于ocr
创建磁盘组命令省略
切换root用户执行如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | [root@rac1 bin] # ./ocrconfig -add +OCR 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 rac1. [grid@rac1 ~]$ asmcmd ASMCMD> lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 409596 407555 0 407555 0 Y DATA/ ASMCMD> exit [grid@rac1 ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 25 10:41:57 2021 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> alter diskgroup ARCH mount ; Diskgroup altered. SQL> l 1* alter diskgroup ARCH mount SQL> c /ARCH/OCR 1* alter diskgroup OCR mount SQL> / Diskgroup altered. SQL> EXIT Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options [grid@rac1 ~]$ asmcmd ASMCMD> lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 409596 409497 0 409497 0 N ARCH/ MOUNTED EXTERN N 512 4096 1048576 409596 407555 0 407555 0 Y DATA/ MOUNTED NORMAL N 512 4096 1048576 3069 2790 1023 883 0 N OCR/ ASMCMD> exit [grid@rac1 ~]$ |
root账户执行提示错误,asmcmd执行查看磁盘组没有mount ,于是进入slqplus 中对磁盘组进行上线处理
切换root继续执行
1 2 3 4 5 6 7 8 9 | [root@rac1 bin] # ./ocrconfig -add +OCR 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 +OCR.255.1 ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher ORA-06512: at line 4 [root@rac1 bin] # |
提示新的错误,DATA磁盘组时我安装grid时候创建的,OCR,ARCH 时安装后使用sql命令创建的
后来查资料时asm 兼容版本不一致,于是有下列操作步骤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | [grid@rac1 ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 25 10:43:52 2021 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> set lines 200 SQL> select name,COMPATIBILITY,DATABASE_COMPATIBILITY from v $asm_diskgroup 2 SQL> / NAME COMPATIBILITY DATABASE_COMPATIBILITY ------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ DATA 11.2.0.0.0 10.1.0.0.0 OCR 11.2.0.0.0 10.1.0.0.0 ARCH 11.2.0.0.0 10.1.0.0.0 SQL> alter diskgroup OCR set attribute 'compatible.asm' = '11.2' ; Diskgroup altered. SQL> L 1* alter diskgroup OCR set attribute 'compatible.asm' = '11.2' SQL> C /OCR/ARCH 1* alter diskgroup ARCH set attribute 'compatible.asm' = '11.2' SQL> / Diskgroup altered. SQL> select name,COMPATIBILITY,DATABASE_COMPATIBILITY from v $asm_diskgroup 2 / NAME COMPATIBILITY DATABASE_COMPATIBILITY ------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ DATA 11.2.0.0.0 10.1.0.0.0 OCR 11.2.0.0.0 10.1.0.0.0 ARCH 11.2.0.0.0 10.1.0.0.0 SQL> ho ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2948 Available space (kbytes) : 259172 ID : 40263290 Device /File Name : +DATA Device /File integrity check succeeded Device /File Name : +OCR 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 bypassed due to non-privileged user SQL> |
切换root账户执行
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | [root@rac1 bin] # ./ocrconfig -add +OCR [root@rac1 bin] # ./ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2948 Available space (kbytes) : 259172 ID : 40263290 Device /File Name : +DATA Device /File integrity check succeeded Device /File Name : +OCR 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@rac1 bin] # ./ocrconfig -delete +DATA [root@rac1 bin] # ./ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2948 Available space (kbytes) : 259172 ID : 40263290 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 succeeded [root@rac1 bin] # |
执行完毕
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?