Oracle 10g rac数据库节点2 asm磁盘组装载不成功问题处理详细步骤
Oracle 10g rac数据库节点2 asm磁盘组装载不成功问题处理详细步骤
1:问题描述
两节点Oracle 10g RAC数据库,节点2上的asm dgdata磁盘组mount不成功,但节点1正常。
问题现象:在节点2上检查磁盘组状态为dismount和对磁盘组dgdata mount,报ORA-15040相关错误:
SQL> select name,state from v$asm_diskgroup;
NAME STATE
DGDATA DISMOUNTED
DGRECOVER MOUNTED
DGSYSTEM MOUNTED
SQL> alter diskgroup dgdata mount;
alter diskgroup dgdata mount*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "46" is missing
ORA-15042: ASM disk "45" is missing
ORA-15042: ASM disk "44" is missing
ORA-15042: ASM disk "43" is missing
ORA-15042: ASM disk "42" is missing
ORA-15042: ASM disk "41" is missing
ORA-15042: ASM disk "40" is missing
ORA-15042: ASM disk "39" is missing
ORA-15042: ASM disk "38" is missing
ORA-15042: ASM disk "37" is missing
ORA-15042: ASM disk "36" is missing
ORA-15042: ASM disk "35" is missing
ORA-15042: ASM disk "34" is missing
ORA-15042: ASM disk "33" is missing
ORA-15042: ASM disk "32" is missing
ORA-15042: ASM disk "31" is missing
ORA-15042: ASM disk "30" is missing
ORA-15042: ASM disk "29" is missing
ORA-15042: ASM disk "28" is missing
ORA-15042: ASM disk "27" is missing
ORA-15042: ASM disk "26" is missing
2 处理过程
2.1 检查dgdata磁盘组有哪些磁盘
检查节点2 dgdata磁盘组能正常mount包括哪些磁盘
select name,path from v$asm_disk where name like 'DGDATA%' ;
DGDATA_0022 /dev/rhdisk36
DGDATA_0033 /dev/rhdisk47
DGDATA_0000 /dev/rhdisk10
DGDATA_0012 /dev/rhdisk13
DGDATA_0011 /dev/rhdisk17
DGDATA_0013 /dev/rhdisk14
DGDATA_0010 /dev/rhdisk16
DGDATA_0014 /dev/rhdisk18
DGDATA_0002 /dev/rhdisk23
DGDATA_0001 /dev/rhdisk22
DGDATA_0003 /dev/rhdisk24
DGDATA_0004 /dev/rhdisk25
DGDATA_0005 /dev/rhdisk26
DGDATA_0019 /dev/rhdisk33
DGDATA_0015 /dev/rhdisk28
DGDATA_0020 /dev/rhdisk34
DGDATA_0016 /dev/rhdisk29
DGDATA_0006 /dev/rhdisk30
DGDATA_0017 /dev/rhdisk31
DGDATA_0018 /dev/rhdisk32
DGDATA_0030 /dev/rhdisk44
DGDATA_0023 /dev/rhdisk37
DGDATA_0027 /dev/rhdisk41
DGDATA_0032 /dev/rhdisk46
DGDATA_0034 /dev/rhdisk48
DGDATA_0024 /dev/rhdisk38
DGDATA_0026 /dev/rhdisk40
DGDATA_0029 /dev/rhdisk43
DGDATA_0021 /dev/rhdisk35
DGDATA_0025 /dev/rhdisk39
DGDATA_0031 /dev/rhdisk45
DGDATA_0028 /dev/rhdisk42
DGDATA_0007 /dev/rhdisk7
DGDATA_0008 /dev/rhdisk8
DGDATA_0009 /dev/rhdisk9
DGDATA_0035 /dev/rhdisk49
DGDATA_0036 /dev/rhdisk50
DGDATA_0037 /dev/rhdisk51
DGDATA_0040 /dev/rhdisk54
DGDATA_0038 /dev/rhdisk52
DGDATA_0041 /dev/rhdisk55
DGDATA_0039 /dev/rhdisk53
DGDATA_0042 /dev/rhdisk56
DGDATA_0043 /dev/rhdisk57
DGDATA_0044 /dev/rhdisk58
DGDATA_0045 /dev/rhdisk59
DGDATA_0046 /dev/rhdisk60
DGDATA_0053 /dev/rhdisk79
DGDATA_0054 /dev/rhdisk80
DGDATA_0049 /dev/rhdisk75
DGDATA_0052 /dev/rhdisk78
DGDATA_0048 /dev/rhdisk74
DGDATA_0050 /dev/rhdisk76
DGDATA_0055 /dev/rhdisk81
DGDATA_0056 /dev/rhdisk82
DGDATA_0047 /dev/rhdisk73
DGDATA_0057 /dev/rhdisk83
DGDATA_0051 /dev/rhdisk77
58 rows select
2.2 检查节点2所属dgdata磁盘组磁盘属性和权限
ls -l /dev/rhdisk*
lsattr –El hdisk77
lsattr –El hdisk83
…………
然后和节点1节点相比较,属性和权限都正确,排除属性和权限的问题。
2.3 与用户沟通
通过上面检查,在还没有确定问题原因和尝试解决方案时,从用户处了解到以下3点信息:
1. 两个节点主机都需要升级微码,节点2平时是处于关闭状态的,为了不影响应用,需要先在节点2上升级微码完后,启动crs和数据库,接管应用,再关闭节点1上的数据库和crs进行升级微码操作,
2. 节点1上dgdata磁盘组能正常mount和dismount。
3. 节点2上dgdata磁盘组不能正常mount。
通过以上3点信息,我可以判定dgdata磁盘组里面的磁盘是没有损坏的,而节点2由于一直处于关机状态导致dgdata磁盘组信息没有同步,于是和用户商量建议把节点2 dgdata磁盘组里面的磁盘全部从主机上删除,再重新扫描,修改磁盘属性和赋予相关权限,而且这样做不存在任何风险。
以下为具体操作过程:
备注:千万不能做chdev -l hdiskn -a pv=yes 操作,会导致磁盘头信息丢失,从而引起数据丢失。
2.4 节点2主机上删除dgdata磁盘组里面的磁盘
[root@dbtest:/oracle/20100410]#more rmdev.sh
rmdev -dl hdisk10
rmdev -dl hdisk13
rmdev -dl hdisk14
rmdev -dl hdisk16
rmdev -dl hdisk17
rmdev -dl hdisk18
rmdev -dl hdisk22
rmdev -dl hdisk23
rmdev -dl hdisk24
rmdev -dl hdisk25
rmdev -dl hdisk26
rmdev -dl hdisk28
rmdev -dl hdisk29
rmdev -dl hdisk30
rmdev -dl hdisk31
rmdev -dl hdisk32
rmdev -dl hdisk33
rmdev -dl hdisk34
rmdev -dl hdisk35
rmdev -dl hdisk36
rmdev -dl hdisk37
rmdev -dl hdisk38
rmdev -dl hdisk39
rmdev -dl hdisk40
rmdev -dl hdisk41
rmdev -dl hdisk42
rmdev -dl hdisk43
rmdev -dl hdisk44
rmdev -dl hdisk45
rmdev -dl hdisk46
rmdev -dl hdisk47
rmdev -dl hdisk48
rmdev -dl hdisk49
rmdev -dl hdisk50
rmdev -dl hdisk51
rmdev -dl hdisk52
rmdev -dl hdisk53
rmdev -dl hdisk54
rmdev -dl hdisk55
rmdev -dl hdisk56
rmdev -dl hdisk57
rmdev -dl hdisk58
rmdev -dl hdisk59
rmdev -dl hdisk60
rmdev -dl hdisk7
rmdev -dl hdisk73
rmdev -dl hdisk74
rmdev -dl hdisk75
rmdev -dl hdisk76
rmdev -dl hdisk77
rmdev -dl hdisk78
rmdev -dl hdisk79
rmdev -dl hdisk8
rmdev -dl hdisk80
rmdev -dl hdisk81
rmdev -dl hdisk82
rmdev -dl hdisk83
rmdev -dl hdisk9
2.5 重新扫描磁盘
cfgmgr -v
2.6 修改磁盘属性
chdev -l hdisk10 -a reserve_policy=no_reserve
chdev -l hdisk13 -a reserve_policy=no_reserve
chdev -l hdisk14 -a reserve_policy=no_reserve
chdev -l hdisk16 -a reserve_policy=no_reserve
chdev -l hdisk17 -a reserve_policy=no_reserve
chdev -l hdisk18 -a reserve_policy=no_reserve
chdev -l hdisk22 -a reserve_policy=no_reserve
chdev -l hdisk23 -a reserve_policy=no_reserve
chdev -l hdisk24 -a reserve_policy=no_reserve
chdev -l hdisk25 -a reserve_policy=no_reserve
chdev -l hdisk26 -a reserve_policy=no_reserve
chdev -l hdisk28 -a reserve_policy=no_reserve
chdev -l hdisk29 -a reserve_policy=no_reserve
chdev -l hdisk30 -a reserve_policy=no_reserve
chdev -l hdisk31 -a reserve_policy=no_reserve
chdev -l hdisk32 -a reserve_policy=no_reserve
chdev -l hdisk33 -a reserve_policy=no_reserve
chdev -l hdisk34 -a reserve_policy=no_reserve
chdev -l hdisk35 -a reserve_policy=no_reserve
chdev -l hdisk36 -a reserve_policy=no_reserve
chdev -l hdisk37 -a reserve_policy=no_reserve
chdev -l hdisk38 -a reserve_policy=no_reserve
chdev -l hdisk39 -a reserve_policy=no_reserve
chdev -l hdisk40 -a reserve_policy=no_reserve
chdev -l hdisk41 -a reserve_policy=no_reserve
chdev -l hdisk42 -a reserve_policy=no_reserve
chdev -l hdisk43 -a reserve_policy=no_reserve
chdev -l hdisk44 -a reserve_policy=no_reserve
chdev -l hdisk45 -a reserve_policy=no_reserve
chdev -l hdisk46 -a reserve_policy=no_reserve
chdev -l hdisk47 -a reserve_policy=no_reserve
chdev -l hdisk48 -a reserve_policy=no_reserve
chdev -l hdisk49 -a reserve_policy=no_reserve
chdev -l hdisk50 -a reserve_policy=no_reserve
chdev -l hdisk51 -a reserve_policy=no_reserve
chdev -l hdisk52 -a reserve_policy=no_reserve
chdev -l hdisk53 -a reserve_policy=no_reserve
chdev -l hdisk54 -a reserve_policy=no_reserve
chdev -l hdisk55 -a reserve_policy=no_reserve
chdev -l hdisk56 -a reserve_policy=no_reserve
chdev -l hdisk57 -a reserve_policy=no_reserve
chdev -l hdisk58 -a reserve_policy=no_reserve
chdev -l hdisk59 -a reserve_policy=no_reserve
chdev -l hdisk60 -a reserve_policy=no_reserve
chdev -l hdisk7 -a reserve_policy=no_reserve
chdev -l hdisk73 -a reserve_policy=no_reserve
chdev -l hdisk74 -a reserve_policy=no_reserve
chdev -l hdisk75 -a reserve_policy=no_reserve
chdev -l hdisk76 -a reserve_policy=no_reserve
chdev -l hdisk77 -a reserve_policy=no_reserve
chdev -l hdisk78 -a reserve_policy=no_reserve
chdev -l hdisk79 -a reserve_policy=no_reserve
chdev -l hdisk8 -a reserve_policy=no_reserve
chdev -l hdisk80 -a reserve_policy=no_reserve
chdev -l hdisk81 -a reserve_policy=no_reserve
chdev -l hdisk82 -a reserve_policy=no_reserve
chdev -l hdisk83 -a reserve_policy=no_reserve
chdev -l hdisk9 -a reserve_policy=no_reserve
2.7 修改磁盘所属用户和权限
chown oracle:dba /dev/rhdisk10
chown oracle:dba /dev/rhdisk13
chown oracle:dba /dev/rhdisk14
chown oracle:dba /dev/rhdisk16
chown oracle:dba /dev/rhdisk17
chown oracle:dba /dev/rhdisk18
chown oracle:dba /dev/rhdisk22
chown oracle:dba /dev/rhdisk23
chown oracle:dba /dev/rhdisk24
chown oracle:dba /dev/rhdisk25
chown oracle:dba /dev/rhdisk26
chown oracle:dba /dev/rhdisk28
chown oracle:dba /dev/rhdisk29
chown oracle:dba /dev/rhdisk30
chown oracle:dba /dev/rhdisk31
chown oracle:dba /dev/rhdisk32
chown oracle:dba /dev/rhdisk33
chown oracle:dba /dev/rhdisk34
chown oracle:dba /dev/rhdisk35
chown oracle:dba /dev/rhdisk36
chown oracle:dba /dev/rhdisk37
chown oracle:dba /dev/rhdisk38
chown oracle:dba /dev/rhdisk39
chown oracle:dba /dev/rhdisk40
chown oracle:dba /dev/rhdisk41
chown oracle:dba /dev/rhdisk42
chown oracle:dba /dev/rhdisk43
chown oracle:dba /dev/rhdisk44
chown oracle:dba /dev/rhdisk45
chown oracle:dba /dev/rhdisk46
chown oracle:dba /dev/rhdisk47
chown oracle:dba /dev/rhdisk48
chown oracle:dba /dev/rhdisk49
chown oracle:dba /dev/rhdisk50
chown oracle:dba /dev/rhdisk51
chown oracle:dba /dev/rhdisk52
chown oracle:dba /dev/rhdisk53
chown oracle:dba /dev/rhdisk54
chown oracle:dba /dev/rhdisk55
chown oracle:dba /dev/rhdisk56
chown oracle:dba /dev/rhdisk57
chown oracle:dba /dev/rhdisk58
chown oracle:dba /dev/rhdisk59
chown oracle:dba /dev/rhdisk60
chown oracle:dba /dev/rhdisk7
chown oracle:dba /dev/rhdisk73
chown oracle:dba /dev/rhdisk74
chown oracle:dba /dev/rhdisk75
chown oracle:dba /dev/rhdisk76
chown oracle:dba /dev/rhdisk77
chown oracle:dba /dev/rhdisk78
chown oracle:dba /dev/rhdisk79
chown oracle:dba /dev/rhdisk8
chown oracle:dba /dev/rhdisk80
chown oracle:dba /dev/rhdisk81
chown oracle:dba /dev/rhdisk82
chown oracle:dba /dev/rhdisk83
chown oracle:dba /dev/rhdisk9
chmod 660 /dev/rhdisk10
chmod 660 /dev/rhdisk13
chmod 660 /dev/rhdisk14
chmod 660 /dev/rhdisk16
chmod 660 /dev/rhdisk17
chmod 660 /dev/rhdisk18
chmod 660 /dev/rhdisk22
chmod 660 /dev/rhdisk23
chmod 660 /dev/rhdisk24
chmod 660 /dev/rhdisk25
chmod 660 /dev/rhdisk26
chmod 660 /dev/rhdisk28
chmod 660 /dev/rhdisk29
chmod 660 /dev/rhdisk30
chmod 660 /dev/rhdisk31
chmod 660 /dev/rhdisk32
chmod 660 /dev/rhdisk33
chmod 660 /dev/rhdisk34
chmod 660 /dev/rhdisk35
chmod 660 /dev/rhdisk36
chmod 660 /dev/rhdisk37
chmod 660 /dev/rhdisk38
chmod 660 /dev/rhdisk39
chmod 660 /dev/rhdisk40
chmod 660 /dev/rhdisk41
chmod 660 /dev/rhdisk42
chmod 660 /dev/rhdisk43
chmod 660 /dev/rhdisk44
chmod 660 /dev/rhdisk45
chmod 660 /dev/rhdisk46
chmod 660 /dev/rhdisk47
chmod 660 /dev/rhdisk48
chmod 660 /dev/rhdisk49
chmod 660 /dev/rhdisk50
chmod 660 /dev/rhdisk51
chmod 660 /dev/rhdisk52
chmod 660 /dev/rhdisk53
chmod 660 /dev/rhdisk54
chmod 660 /dev/rhdisk55
chmod 660 /dev/rhdisk56
chmod 660 /dev/rhdisk57
chmod 660 /dev/rhdisk58
chmod 660 /dev/rhdisk59
chmod 660 /dev/rhdisk60
chmod 660 /dev/rhdisk7
chmod 660 /dev/rhdisk73
chmod 660 /dev/rhdisk74
chmod 660 /dev/rhdisk75
chmod 660 /dev/rhdisk76
chmod 660 /dev/rhdisk77
chmod 660 /dev/rhdisk78
chmod 660 /dev/rhdisk79
chmod 660 /dev/rhdisk8
chmod 660 /dev/rhdisk80
chmod 660 /dev/rhdisk81
chmod 660 /dev/rhdisk82
chmod 660 /dev/rhdisk83
chmod 660 /dev/rhdisk9
2.8 关闭dbtest节点上的asm实例
Export ORACLE_SID= +ASM2
Sqlplus / as sysdba
Shutdown immediate
2.9 重新启动dbtest节点上的asm实例和检查磁盘组状态
[oracle@dbtest:/oracle/app/oracle]$sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Sat Apr 10 16:39:24 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size 2071104 bytes
Variable Size 102786496 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> select name,state from v$asm_diskgroup;
NAME STATE
DGDATA MOUNTED
DGRECOVER MOUNTED
DGSYSTEM MOUNTED
磁盘组能正常mount,实例也正常打开了,用户非常满意,可以进行下一个节点的主机升级微码操作了。
3 总结
3.1 问题原因总结
首先判定节点2由于长期处于关机状态,dgdata磁盘组信息没有同步,而导致dgdata磁盘组装载不成功,还需进一步去研究和确认。