一、问题现象
使用linux6 安装Oracle RAC11G,在执行root.sh脚本时,会去安装GI集群软件,其中脚本执行报错
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
Disk Group ora creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "ORA_0000"
二、问题分析
2.1 查询安装报错日志
[main] [ 2022-04-12 16:48:10.881 CST ] [OracleHome.getVersion:1026]
Current version from sqlplus: 11.2.0.4.0
[main] [ 2022-04-12 16:48:10.882 CST ] [UsmcaLogger.logInfo:143]
Role SYSASM
[main] [ 2022-04-12 16:48:10.882 CST ] [UsmcaLogger.logInfo:143]
OS Auth true
[main] [ 2022-04-12 16:48:13.577 CST ] [SQLEngine.done:2189] Done called
[main] [ 2022-04-12 16:48:13.578 CST ] [USMInstance.configureLocalASM:3041]
ORA-15032: not all alterations performed
ORA-15017: diskgroup "ORA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks
for diskgroup "ORA"
[main] [ 2022-04-12 16:48:13.760 CST ] [UsmcaLogger.logInfo:143]
CREATE DISKGROUP SQL: CREATE DISKGROUP ora EXTERNAL REDUNDANCY
DISK '/dev/asm_ocr01',
'/dev/asm_ocr02',
'/dev/asm_ocr03' ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='1M'
[main] [ 2022-04-12 16:48:13.977 CST ] [SQLEngine.done:2189] Done called
[main] [ 2022-04-12 16:48:13.977 CST ] [UsmcaLogger.logException:173]
SEVERE:method oracle.sysman.assistants.usmca.backend.
USMDiskGroupManager:
createDiskGroups
[main] [ 2022-04-12 16:48:13.977 CST ] [UsmcaLogger.logException:174]
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "ORA_0000"
[main] [ 2022-04-12 16:48:13.978 CST ] [UsmcaLogger.logException:175]
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException:
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "ORA_0000"
得到的信息是和ASM磁盘有关系,创建asm磁盘组失败,无法对Ora磁盘组mount!
2.2 查询ASM日志
SQL> CREATE DISKGROUP ora EXTERNAL REDUNDANCY DISK
'/dev/asm_ocr01', '/dev/asm_ocr02', '/dev/asm_ocr03' ATTRIBUTE
'compatible.asm'='11.2.0.0.0','au_size'='1M'
NOTE: Assigning number (1,0) to disk (/dev/asm_ocr01)
NOTE: Assigning number (1,1) to disk (/dev/asm_ocr02)
NOTE: Assigning number (1,2) to disk (/dev/asm_ocr03)
NOTE: initializing header on grp 1 disk ORA_0000
NOTE: initializing header on grp 1 disk ORA_0001
NOTE: initializing header on grp 1 disk ORA_0002
WARNING: detected duplicate paths to the same disk:
'/dev/dm-7' and
'/dev/asm_ocr03'
More trace information dumped to
'/u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_71574.trc'
WARNING: detected duplicate paths to the same disk:
'/dev/dm-6' and
'/dev/asm_ocr02'
More trace information dumped to
'/u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_71574.trc'
WARNING: detected duplicate paths to the same disk:
'/dev/dm-5' and
'/dev/asm_ocr01'
More trace information dumped to
'/u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_71574.trc'
NOTE: erasing header on grp 1 disk ORA_0000
NOTE: erasing header on grp 1 disk ORA_0001
NOTE: erasing header on grp 1 disk ORA_0002
GMON dismounting group 1 at 7 for pid 24, osid 71574
NOTE: Disk ORA_0000 in mode 0x7e marked for de-assignment
NOTE: Disk ORA_0001 in mode 0x7e marked for de-assignment
NOTE: Disk ORA_0002 in mode 0x7e marked for de-assignment
ERROR: diskgroup ORA was not created
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "ORA_0000"
ERROR: CREATE DISKGROUP ora EXTERNAL REDUNDANCY DISK
'/dev/asm_ocr01', '/dev/asm_ocr02', '/dev/asm_ocr03' ATTRIBUTE
'compatible.asm'='11.2.0.0.0','au_size'='1M'
2.3 匹配MOS相关解决方案
2.3.1问题现象
ASM Diskgroup Creation Failed With The “ORA-15020:
Discovered Duplicate ASM Disk [Raw Device Name]"
Error On Solaris Using EMC PowerPath Raw Devices. (Doc ID 1594154.1)
ASM diskgroup cannot be created due to the ORA-15020 error:
SQL> CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK '/dev/rdsk/emcpower1';
create diskgroup data external redundancy disk
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "DATA_0000
参考
http://blog.itpub.net/29785807/viewspace-2769662/
2.3.2问题原因
15020, 00000, "discovered duplicate ASM disk \"%s\""
// *Cause: The discovery encountered two disks claiming to be the same
// named ASM disk.
// *Action: Check that the ASM_DISKSTRING parameter specifies only a
// single path for each disk.
2.3.3举例说明
2) Candidate disks are EMC PowerPath multipath raw devices.
3) ASM_DISKSTRING parameter is set = “/dev/rdsk/emcpower*” & “/dev/rdsk/*”:
SQL> show parameter ASM_DISKSTRING
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string '/dev/rdsk/emcpower*', '/dev/rdsk/*'
4) Having ASM_DISKSTRING parameter is set = '/dev/rdsk/emcpower*' & '/dev/rdsk/*'
then all the “/dev/rdsk/*” raw devices are being discovered by ASM.
Thus the V$ASM_DISK view is reporting/detecting all the raw devices disks &
EMC pseudo devices (both: the 1st path to access the physical disk “e.g.
/dev/rdsk/c3t1d5s4”, the 2nd path to access the same physical disk “e.g.
/dev/rdsk/c4t1d5s4” & the EMC pseudo device “e.g. /dev/rdsk/emcpower1” ).
In other words, ASM is detecting duplicated raw devices to access the same physical
disk, thus when ASM detects these duplicated disks, it generates the ORA-15020 error.
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
/dev/rdsk/c3t1d5s4 <(==== (1st path)
/dev/rdsk/c4t1d5s4 <(==== (2nd path)
/dev/rdsk/emcpower1 <(==== (EMC PowerPath pseudo device)
3 rows selected.
5) "ASM and Multipathing Best Practices" documentation states:
Set :
ASM_DISKSTRING = '/dev/rdsk/emcpower*'
2.3.4 可能涉及的版本
Oracle Database - Enterprise Edition - Version 11.2.0.1.0 and later
ASMCA is not able to use disk paths other than /dev/raw/* when configuring ASM and create diskgroups at initial setup for single instance environment.
RAC environment did not have this issue.
Also, diskgroup creation with any disk paths works at the command line once the ASM instance is configured.
ASMCA would fail with ORA-15020 errors while there was no duplicate disk path found.
Sample errors in ASMCA log are
CAUSE
This problem is caused by unpublished bug 9117353.
From the bug:
"When the resource ora.asm is created, by default assign an empty value to parameter asm_diskstring. When this value is left open, at the time of creating the diskgroup, if there are multiple paths to a same device, error ORA-15020 will be reported,no matter the disk passed to the create diskgroup is unique.
This will happen when using 11gR1 or 11gR2, setting asm_diskstring null or to a value that discover multiple paths to a disk. The create diskgroup statement will fail."
Bug 22898198 - Creating Diskgroup fails with errors ORA-15018 ORA-15020 (Doc ID 22898198.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 12.1.0.2 but BELOW 18.1
Versions confirmed as being affected
12.2.0.1 (Base Release)
12.1.0.2 (Server Patch Set)
Platforms affected Generic (all / most platforms affected)
Fixed:
The fix for 22898198 is first included in
18.1.0
12.2.0.1.171017 (Oct 2017) Database Release Update (DB RU)
12.2.0.1.171017 (Oct 2017) Bundle Patch for Windows Platforms
三、问题处理
原因就是asm磁盘有多个,导致rac安装的脚本无法正确识别唯一的盘,图形化重新安装修改磁盘检索路径asm_diskstring,修改前/dev/修改后 /dev/asm-,重装OK
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




