故障现象
19c在创建数据库的时候,选择数据文件位置的时候,发现不了磁盘组,如下图所示
即使手工填写磁盘组名称,下一步也会报错
故障分析
分析dbca日志
进入目录$ORACLE_BASE/cfgtoollogs/dbca看最新的trace日志文件,发现在执行kfod命令时候存在报错
KFOD - Kernel Files OSM Disk
KFOD实用程序用于从操作系统级别模拟磁盘发现,可以在$GRID_HOME/bin目录中找到它。
KFOD在安装时使用(例如OUI,DBCA或ASMCA),以便执行磁盘发现。
INFO: Apr 12, 2023 7:04:22 PM oracle.install.commons.util.StatusControl showMessage
INFO: Checking if ASM is configured
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [KfodUtil.kfodOutput:382] /u01/app/19.0.0/grid/bin/kfod
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [KfodUtil.kfodOutput:382] nohdr=TRUE
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [KfodUtil.kfodOutput:382] OP=GROUPS
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [KfodUtil.kfodOutput:382] status=true
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [KfodUtil.kfodOutput:382] asmcompatibility=true dbcompatibility=true
[pool-1-thread-1] [ 2023-04-12 19:04:22.853 CST ] [OsUtilsBase.execProgInheritAddEnvNReturnOutput:2262] API execProgInheritAddEnvReturnOutput invoked
[pool-1-thread-1] [ 2023-04-12 19:04:22.873 CST ] [OsUtilsBase.execProgInheritAddEnvNReturnOutput:2268] Exec prog return code: 1
[pool-1-thread-1] [ 2023-04-12 19:04:22.873 CST ] [KfodUtil.kfodOutput:393] Kfod result
Error 49802 initializing ADR at /u01/app/grid
ERROR!!! could not initialize the diag context
[pool-1-thread-1] [ 2023-04-12 19:04:22.876 CST ] [KfodUtil.getDiskgroupsWithCompatibilityValues:609] diskgroup details using kfod ADR Error 49802 initializing /u01/app/grid at
[pool-1-thread-1] [ 2023-04-12 19:04:22.876 CST ] [ASMUtils.loadDiskGroups:1281] Loading the diskgroups. exception using kfodError retrieving diskgroup using kfod utility, For input string: "Error"
[pool-1-thread-1] [ 2023-04-12 19:04:22.882 CST ] [Version.isPre:757] version to be checked 19.0.0.0.0 major version to check against 10
[pool-1-thread-1] [ 2023-04-12 19:04:22.882 CST ] [Version.isPre:768] isPre.java: Returning FALSE
[pool-1-thread-1] [ 2023-04-12 19:04:22.882 CST ] [Version.isPre:757] version to be checked 19.0.0.0.0 major version to check against 10
[pool-1-thread-1] [ 2023-04-12 19:04:22.882 CST ] [Version.isPre:768] isPre.java: Returning FALSE
[pool-1-thread-1] [ 2023-04-12 19:04:22.882 CST ] [UnixSystem.isCRSConfigured:3567] configFile=/etc/oracle/ocr.loc
......
SEVERE: Apr 12, 2023 7:04:22 PM oracle.install.commons.util.exception.AbstractErrorAdvisor getDetailedMessage
SEVERE: [FATAL] [DBT-05801] There are no ASM disk groups detected.
CAUSE: ASM may not be configured, or ASM disk groups are not created yet.
ACTION: Create ASM disk groups, or change the storage location to File System.
WARNING: Apr 12, 2023 7:04:22 PM oracle.install.commons.util.exception.AbstractErrorAdvisor getDetailedMessage
WARNING: [WARNING] [DBT-11003] ASM storage option is selected for datafile location. However Oracle Managed Files (OMF) option is not selected.
CAUSE: OMF option is recommended when datafiles are placed in ASM storage.
SEVERE: Apr 12, 2023 7:04:22 PM oracle.assistants.common.base.util.AssistantAdvisor logMessage
SEVERE: [ 2023-04-12 19:04:22.918 CST ] [FATAL] [DBT-05801] There are no ASM disk groups detected.
WARNING: Apr 12, 2023 7:04:22 PM oracle.assistants.common.base.util.AssistantAdvisor logMessage
WARNING: [ 2023-04-12 19:04:22.918 CST ] [WARNING] [DBT-11003] ASM storage option is selected for datafile location. However Oracle Managed Files (OMF) option is not selected.
手工执行报错命令
节点1报错:
$ /u01/app/19.0.0/grid/bin/kfod nohdr=TRUE OP=GROUPS status=true asmcompatibility=true dbcompatibility=true
Error 49802 initializing ADR at /u01/app/grid
ERROR!!! could not initialize the diag context
节点2正常:
$ /u01/app/19.0.0/grid/bin/kfod nohdr=TRUE OP=GROUPS status=true asmcompatibility=true dbcompatibility=true
30720 4484 NORMAL OCRDG 10.1.0.0.0 19.0.0.0.0
20480 15102 EXTERN DATA2 10.1.0.0.0 11.2.0.2.0
164576 152064 EXTERN DATA12C 10.1.0.0.0 19.0.0.0.0
40960 1720 NORMAL DATA1 11.2.0.0.0 19.0.0.0.0
strace工具跟踪节点1执行命令,发现存在权限不足的报错
$ strace /u01/app/19.0.0/grid/bin/kfod nohdr=TRUE OP=GROUPS status=true asmcompatibility=true dbcompatibility=true
stat("/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned", 0x7ffd4405d5b0) = -1 ENOENT (No such file or directory)
stat("/u01/app/grid/diag/kfod/rac01/kfod/log", 0x7ffd4405e040) = -1 EACCES (Permission denied)
stat("/u01/app/grid/diag/kfod/rac01/kfod", 0x7ffd4405e040) = -1 EACCES (Permission denied)
stat("/u01/app/grid/diag/kfod/rac01", 0x7ffd4405e040) = -1 EACCES (Permission denied)
stat("/u01/app/grid/diag/kfod", {st_mode=S_IFDIR|0700, st_size=41, ...}) = 0
对比两个节点的权限,发现权限不一致,一节点的权限较小
节点1
[root@rac01 diag]# ll /u01/app/grid/diag/kfod -d
drwx------ 3 grid oinstall 41 4月 12 18:40 /u01/app/grid/diag/kfod
[root@rac01 diag]# ll /u01/app/grid/diag/kfod/rac01/ -d
drwx------ 3 grid oinstall 18 6月 24 2021 /u01/app/grid/diag/kfod/rac01/
[root@rac01 diag]# ll /u01/app/grid/diag/kfod/rac01/kfod/
总用量 204
drwx------ 2 grid oinstall 21 10月 14 2021 alert
drwx------ 2 grid oinstall 6 6月 24 2021 cdump
drwx------ 2 grid oinstall 6 6月 24 2021 incident
drwx------ 2 grid oinstall 6 6月 24 2021 incpkg
drwx------ 2 grid oinstall 4096 6月 24 2021 lck
drwx------ 5 grid oinstall 48 6月 24 2021 log
drwx------ 2 grid oinstall 4096 6月 24 2021 metadata
drwx------ 2 grid oinstall 6 6月 24 2021 metadata_dgif
drwx------ 2 grid oinstall 6 6月 24 2021 metadata_pv
drwx------ 2 grid oinstall 6 6月 24 2021 stage
drwx------ 2 grid oinstall 6 6月 24 2021 sweep
drwx------ 2 grid oinstall 155648 4月 12 18:43 trace
[root@rac01 diag]#
节点2
[root@rac02 ~]# ll /u01/app/grid/diag/kfod -d
drwxrwxr-x 3 grid oinstall 19 6月 24 2021 /u01/app/grid/diag/kfod
[root@rac02 ~]# ll /u01/app/grid/diag/kfod/rac02/ -d
drwxrwxrwt 3 grid oinstall 18 6月 24 2021 /u01/app/grid/diag/kfod/rac02/
[root@rac02 ~]# ll /u01/app/grid/diag/kfod/rac02/kfod/
总用量 92
drwxrwxr-x 2 grid oinstall 21 5月 23 2022 alert
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 cdump
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 incident
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 incpkg
drwxrwxr-x 2 grid oinstall 4096 6月 24 2021 lck
drwxrwxr-x 5 grid oinstall 48 6月 24 2021 log
drwxrwxr-x 2 grid oinstall 4096 6月 24 2021 metadata
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 metadata_dgif
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 metadata_pv
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 stage
drwxrwxr-x 2 grid oinstall 6 6月 24 2021 sweep
drwxrwxr-x 2 grid oinstall 61440 4月 12 19:38 trace
[root@rac02 ~]#
解决方案
修改节点1的权限与节点2一致,修改后使用kfod工具验证输出结果正常即可
# chmod -R 775 /u01/app/grid/diag/kfod
# chmod 777 /u01/app/grid/diag/kfod/rac01/
订阅号:DongDB手记
墨天轮:https://www.modb.pro/u/231198
最后修改时间:2023-04-13 14:41:23
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。