Oracle RAC 10g error:ORA-15032 and ORA-15063
今天,启动RAC的时候,遇到了如题所示的错误。
它的更详细描述如下:
查看RAC集群资源的状态)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[root@oel1 ~]# /u01/app/10g/grid/bin/crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....L1.inst application 0/5 0/0 OFFLINE OFFLINE ora....L2.inst application 0/5 0/0 OFFLINE OFFLINE ora....L3.inst application 0/5 0/0 ONLINE ONLINE oel3 ora.ORCL.db application 0/0 0/1 ONLINE ONLINE oel1 ora....SM1.asm application 0/5 0/0 ONLINE ONLINE oel1 ora....L1.lsnr application 0/5 0/0 ONLINE ONLINE oel1 ora.oel1.gsd application 0/5 0/0 ONLINE ONLINE oel1 ora.oel1.ons application 0/3 0/0 ONLINE ONLINE oel1 ora.oel1.vip application 0/0 0/0 ONLINE ONLINE oel1 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE oel2 ora....L2.lsnr application 0/5 0/0 ONLINE ONLINE oel2 ora.oel2.gsd application 0/5 0/0 ONLINE ONLINE oel2 ora.oel2.ons application 0/3 0/0 ONLINE ONLINE oel2 ora.oel2.vip application 0/0 0/0 ONLINE ONLINE oel2 ora....SM3.asm application 0/5 0/0 ONLINE ONLINE oel3 ora....L3.lsnr application 0/5 0/0 ONLINE ONLINE oel3 ora.oel3.gsd application 0/5 0/0 ONLINE ONLINE oel3 ora.oel3.ons application 0/3 0/0 ONLINE ONLINE oel3 ora.oel3.vip application 0/0 0/0 ONLINE ONLINE oel3 [root@oel1 ~]# |
可以看到,其中节点一、二的数据库实例资源无法启动。
以oracle用户登录节点一,尝试手动启动数据库资源)
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 |
[root@oel1 ~]# su - oracle [oracle@oel1 ~]$ export ORACLE_SID=ORCL1 [oracle@oel1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 16:36:21 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> !ps -ef | grep --color asm_ oracle 3005 2926 0 16:36 pts/3 00:00:00 /bin/bash -c ps -ef | grep --color asm_ oracle 22164 1 0 16:03 ? 00:00:00 asm_pmon_+ASM1 oracle 22166 1 0 16:03 ? 00:00:00 asm_diag_+ASM1 oracle 22168 1 0 16:03 ? 00:00:00 asm_psp0_+ASM1 oracle 22170 1 0 16:03 ? 00:00:00 asm_lmon_+ASM1 oracle 22172 1 0 16:03 ? 00:00:00 asm_lmd0_+ASM1 oracle 22174 1 0 16:03 ? 00:00:00 asm_lms0_+ASM1 oracle 22178 1 0 16:03 ? 00:00:00 asm_mman_+ASM1 oracle 22180 1 0 16:03 ? 00:00:00 asm_dbw0_+ASM1 oracle 22182 1 0 16:03 ? 00:00:00 asm_lgwr_+ASM1 oracle 22184 1 0 16:03 ? 00:00:00 asm_ckpt_+ASM1 oracle 22186 1 0 16:03 ? 00:00:00 asm_smon_+ASM1 oracle 22188 1 0 16:03 ? 00:00:00 asm_rbal_+ASM1 oracle 22190 1 0 16:03 ? 00:00:00 asm_gmon_+ASM1 oracle 22197 1 0 16:03 ? 00:00:00 asm_lck0_+ASM1 SQL> SQL> !ps -ef | grep --color ora_ oracle 3048 2926 0 16:36 pts/3 00:00:00 /bin/bash -c ps -ef | grep --color ora_ SQL> !ls $ORACLE_HOME/dbs/ | grep ORCL hc_ORCL1.dat initORCL1.ora orapwORCL1 SQL> !cat $ORACLE_HOME/dbs/initORCL1.ora SPFILE='+DATA01/ORCL/spfileORCL.ora' SQL> SQL> startup ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DATA01/ORCL/spfileORCL.ora' ORA-17503: ksfdopn:2 Failed to open file +DATA01/ORCL/spfileORCL.ora ORA-15077: could not locate ASM instance serving a required diskgroup SQL> SQL> exit Disconnected [oracle@oel1 ~]$ |
可以通过反馈信息看到,数据库实例之所以无法启动的原因是:
在启动数据库实例的时候,找到initORCL1.ora文件,通过其中的描述,去找spfileORCL.ora。
无法找到。
于是数据库启动失败。
查看ASM资源的状态)
以oracle用户登录节点一,查看有关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 |
[oracle@oel1 ~]$ whoami oracle [oracle@oel1 ~]$ env | grep SID ORACLE_SID=ORCL1 [oracle@oel1 ~]$ ps -ef | grep --color asm_ oracle 4828 2814 0 16:41 pts/3 00:00:00 grep --color asm_ oracle 22164 1 0 16:03 ? 00:00:00 asm_pmon_+ASM1 oracle 22166 1 0 16:03 ? 00:00:00 asm_diag_+ASM1 oracle 22168 1 0 16:03 ? 00:00:00 asm_psp0_+ASM1 oracle 22170 1 0 16:03 ? 00:00:00 asm_lmon_+ASM1 oracle 22172 1 0 16:03 ? 00:00:00 asm_lmd0_+ASM1 oracle 22174 1 0 16:03 ? 00:00:00 asm_lms0_+ASM1 oracle 22178 1 0 16:03 ? 00:00:00 asm_mman_+ASM1 oracle 22180 1 0 16:03 ? 00:00:00 asm_dbw0_+ASM1 oracle 22182 1 0 16:03 ? 00:00:00 asm_lgwr_+ASM1 oracle 22184 1 0 16:03 ? 00:00:00 asm_ckpt_+ASM1 oracle 22186 1 0 16:03 ? 00:00:00 asm_smon_+ASM1 oracle 22188 1 0 16:03 ? 00:00:00 asm_rbal_+ASM1 oracle 22190 1 0 16:03 ? 00:00:00 asm_gmon_+ASM1 oracle 22197 1 0 16:03 ? 00:00:00 asm_lck0_+ASM1 [oracle@oel1 ~]$ export ORACLE_SID=+ASM1 [oracle@oel1 ~]$ [oracle@oel1 ~]$ asmcmd ASMCMD> lsdg ASMCMD> exit [oracle@oel1 ~]$ [oracle@oel1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 16:41:43 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ +ASM1 STARTED SQL> select count(*) from v$asm_disk; COUNT(*) ---------- 0 SQL> select count(*) from v$asm_diskgroup; COUNT(*) ---------- 0 SQL> SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@oel1 ~]$ [oracle@oel1 ~]$ |
可以看到节点一虽然ASM实例启动了,但是其中无法找到有关ASM Disk Group的定义。
事实上ASM DG是被定义了的。
在上面RAC的资源状态中可以看到节点三的数据库实例是被成功ONLINE的。
查看节点三上有关DB Instance与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 68 |
[root@oel3 ~]# su - oracle [oracle@oel3 ~]$ ps -ef | grep asm_ oracle 8929 1 0 15:50 ? 00:00:00 asm_pmon_+ASM3 oracle 8931 1 0 15:50 ? 00:00:00 asm_diag_+ASM3 oracle 8933 1 0 15:50 ? 00:00:00 asm_psp0_+ASM3 oracle 8935 1 0 15:50 ? 00:00:00 asm_lmon_+ASM3 oracle 8937 1 0 15:50 ? 00:00:00 asm_lmd0_+ASM3 oracle 8944 1 0 15:50 ? 00:00:00 asm_lms0_+ASM3 oracle 8948 1 0 15:50 ? 00:00:00 asm_mman_+ASM3 oracle 8950 1 0 15:50 ? 00:00:00 asm_dbw0_+ASM3 oracle 8952 1 0 15:50 ? 00:00:00 asm_lgwr_+ASM3 oracle 8954 1 0 15:50 ? 00:00:00 asm_ckpt_+ASM3 oracle 8956 1 0 15:50 ? 00:00:00 asm_smon_+ASM3 oracle 8958 1 0 15:50 ? 00:00:00 asm_rbal_+ASM3 oracle 8960 1 0 15:50 ? 00:00:00 asm_gmon_+ASM3 oracle 8967 1 0 15:50 ? 00:00:00 asm_lck0_+ASM3 oracle 9284 1 0 15:50 ? 00:00:00 asm_o000_+ASM3 oracle 31434 31371 0 16:45 pts/3 00:00:00 grep asm_ [oracle@oel3 ~]$ export ORACLE_SID=+ASM3 [oracle@oel3 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 16:46:00 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ +ASM3 STARTED SQL> set linesize 300 SQL> col name for a12 SQL> col path for a40 SQL> SQL> select group_number,disk_number,name,mount_status,state,total_mb,free_mb,path,to_char(mount_date,'yyyy-mon-dd hh24:mi:ss'),to_char(create_date,'yyyy-mon-dd hh24:mi:ss') from v$asm_disk; GROUP_NUMBER DISK_NUMBER NAME MOUNT_S STATE TOTAL_MB FREE_MB PATH TO_CHAR(MOUNT_DATE,' TO_CHAR(CREATE_DATE, ------------ ----------- ------------ ------- -------- ---------- ---------- ---------------------------------------- -------------------- -------------------- 1 0 DATA01_0000 CACHED NORMAL 19031 17621 /dev/oracleasm/disks/DATA01 2014-sep-20 15:50:30 2014-sep-19 14:06:23 SQL> SQL> col COMPATIBILITY for a12 SQL> col DATABASE_COMPATIBILITY for a12 SQL> select group_number,name,type,state,total_mb,free_mb,compatibility,database_compatibility from v$asm_diskgroup; GROUP_NUMBER NAME TYPE STATE TOTAL_MB FREE_MB COMPATIBILIT DATABASE_COM ------------ ------------ ------ ----------- ---------- ---------- ------------ ------------ 1 DATA01 EXTERN MOUNTED 19031 17621 10.1.0.0.0 10.1.0.0.0 SQL> SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@oel3 ~]$ [oracle@oel3 ~]$ asmcmd ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN N N 512 4096 1048576 19031 17621 0 17621 0 DATA01/ ASMCMD> exit [oracle@oel3 ~]$ |
并且,在节点一或者节点二上尝试挂载ASM DG,将会遇到如题所示的错误。
如下:
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 |
[oracle@oel1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 16:57:05 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ +ASM1 STARTED SQL> alter diskgroup all mount; alter diskgroup all mount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA01" SQL> |
发生该错误的时候,Alert日志的报错如下:
1 2 3 4 5 6 7 8 9 10 |
Sat Sep 20 16:57:21 CST 2014 SQL> alter diskgroup all mount Sat Sep 20 16:57:21 CST 2014 NOTE: cache registered group DATA01 number=1 incarn=0x2d2caf28 Sat Sep 20 16:57:21 CST 2014 ERROR: no PST quorum in group 1: required 2, found 0 Sat Sep 20 16:57:21 CST 2014 NOTE: cache dismounting group 1/0x2D2CAF28 (DATA01) NOTE: dbwr not being msg'd to dismount ERROR: diskgroup DATA01 was not mounted |
综上所述:
造成RAC 10g集群中节点一、二的数据库实例状态不正常的原因是由于节点一、二的ASM实例虽然启动了,但是其中没有ASM DG的记录无法挂载ASM DG导致的。
因为无法挂载ASM DG,所以无法找到SPFILE(SPFILE位于ASM DG中)。
无法找到Spfile,当然数据库实例的启动会失败。
——————————————————————————
解法:
关于上面的问题,发生的原因很多。
在这里,在我的环境中,产生的原因是:Oracle ASMLib的磁盘权限不正确,以至于oracle操作系统用户无法读取到通过“oracleasm createdisk …”创建的对象导致的。
具体情况如下:
节点一(错误的节点):
1 2 3 |
[root@oel1 ~]# ll /dev/oracleasm/disks/* brw------- 1 root root 8, 18 Sep 20 15:16 /dev/oracleasm/disks/DATA01 [root@oel1 ~]# |
节点三(正确的节点):
1 2 3 |
[root@oel3 ~]# ll /dev/oracleasm/disks/* brw-rw---- 1 oracle oinstall 8, 18 Sep 20 17:07 /dev/oracleasm/disks/DATA01 [root@oel3 ~]# |
关于Oracle ASMLib的状态:
节点一(错误的节点):
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 |
[root@oel1 ~]# /etc/init.d/oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@oel1 ~]# cat /etc/sysconfig/oracleasm # # This is a configuration file for automatic loading of the Oracle # Automatic Storage Management library kernel driver. It is generated # By running /etc/init.d/oracleasm configure. Please use that method # to modify this file # # ORACLEASM_ENABELED: 'true' means to load the driver on boot. ORACLEASM_ENABLED=true # ORACLEASM_UID: Default user owning the /dev/oracleasm mount point. ORACLEASM_UID= # ORACLEASM_GID: Default group owning the /dev/oracleasm mount point. ORACLEASM_GID= # ORACLEASM_SCANBOOT: 'true' means scan for ASM disks on boot. ORACLEASM_SCANBOOT=true # ORACLEASM_SCANORDER: Matching patterns to order disk scanning ORACLEASM_SCANORDER="" # ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE="" [root@oel1 ~]# |
节点三(正确的节点):
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 |
[root@oel3 ~]# /etc/init.d/oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@oel3 ~]# cat /etc/sysconfig/oracleasm # # This is a configuration file for automatic loading of the Oracle # Automatic Storage Management library kernel driver. It is generated # By running /etc/init.d/oracleasm configure. Please use that method # to modify this file # # ORACLEASM_ENABELED: 'true' means to load the driver on boot. ORACLEASM_ENABLED=true # ORACLEASM_UID: Default user owning the /dev/oracleasm mount point. ORACLEASM_UID=oracle # ORACLEASM_GID: Default group owning the /dev/oracleasm mount point. ORACLEASM_GID=oinstall # ORACLEASM_SCANBOOT: 'true' means scan for ASM disks on boot. ORACLEASM_SCANBOOT=true # ORACLEASM_SCANORDER: Matching patterns to order disk scanning ORACLEASM_SCANORDER="" # ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE="" [root@oel3 ~]# |
通过对比,问题的原因显而易见。
更正:
有问题的节点(节点一、二)都需要更改,这里以节点一做演示:
修改/etc/sysconfig/oracleasm文件的内容)
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 |
[root@oel1 ~]# cat /etc/sysconfig/oracleasm # # This is a configuration file for automatic loading of the Oracle # Automatic Storage Management library kernel driver. It is generated # By running /etc/init.d/oracleasm configure. Please use that method # to modify this file # # ORACLEASM_ENABELED: 'true' means to load the driver on boot. ORACLEASM_ENABLED=true # ORACLEASM_UID: Default user owning the /dev/oracleasm mount point. ORACLEASM_UID=oracle # ORACLEASM_GID: Default group owning the /dev/oracleasm mount point. ORACLEASM_GID=oinstall # ORACLEASM_SCANBOOT: 'true' means scan for ASM disks on boot. ORACLEASM_SCANBOOT=true # ORACLEASM_SCANORDER: Matching patterns to order disk scanning ORACLEASM_SCANORDER="" # ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE="" [root@oel1 ~]# |
重启oracleasm:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@oel1 ~]# ll /dev/oracleasm/disks/* brw------- 1 root root 8, 18 Sep 20 15:16 /dev/oracleasm/disks/DATA01 [root@oel1 ~]# [root@oel1 ~]# /etc/init.d/oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@oel1 ~]# /etc/init.d/oracleasm stop Dropping Oracle ASMLib disks: [ OK ] Shutting down the Oracle ASMLib driver: [ OK ] [root@oel1 ~]# /etc/init.d/oracleasm status Checking if ASM is loaded: no Checking if /dev/oracleasm is mounted: no [root@oel1 ~]# /etc/init.d/oracleasm start Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ] [root@oel1 ~]# [root@oel1 ~]# ll /dev/oracleasm/disks/* brw-rw---- 1 oracle oinstall 8, 18 Sep 20 17:14 /dev/oracleasm/disks/DATA01 [root@oel1 ~]# |
确认/dev/oracleasm/diks/*下的文件权限正常,则表示对/etc/sysconfig/oracleasm文件的修改生效。
然后,通过oracle用户再次尝试对ASM DG的挂载:
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 68 69 70 |
[root@oel1 ~]# su - oracle [oracle@oel1 ~]$ export ORACLE_SID=+ASM1 [oracle@oel1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 17:15:49 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> set linesize 400 SQL> col name for a12 SQL> col path for a38 SQL> col COMPATIBILITY for a12 SQL> col DATABASE_COMPATIBILITY for a12 SQL> SQL> select group_number,disk_number,name,mount_status,state,total_mb,free_mb,path,to_char(mount_date,'yyyy-mon-dd hh24:mi:ss'),to_char(create_date,'yyyy-mon-dd hh24:mi:ss') from v$asm_disk; GROUP_NUMBER DISK_NUMBER NAME MOUNT_S STATE TOTAL_MB FREE_MB PATH TO_CHAR(MOUNT_DATE,' TO_CHAR(CREATE_DATE, ------------ ----------- ------------ ------- -------- ---------- ---------- -------------------------------------- -------------------- -------------------- 0 0 CLOSED NORMAL 19031 0 /dev/oracleasm/disks/DATA01 2014-sep-20 15:50:30 2014-sep-19 14:06:23 SQL> SQL> select group_number,name,type,state,total_mb,free_mb,compatibility,database_compatibility from v$asm_diskgroup; GROUP_NUMBER NAME TYPE STATE TOTAL_MB FREE_MB COMPATIBILIT DATABASE_COM ------------ ------------ ------ ----------- ---------- ---------- ------------ ------------ 0 DATA01 DISMOUNTED 0 0 0.0.0.0.0 0.0.0.0.0 SQL> SQL> !asmcmd ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name DISMOUNTED N N 512 4096 1048576 0 0 0 0 0 DATA01/ ASMCMD> exit SQL> SQL> alter diskgroup all mount; Diskgroup altered. SQL> select group_number,disk_number,name,mount_status,state,total_mb,free_mb,path,to_char(mount_date,'yyyy-mon-dd hh24:mi:ss'),to_char(create_date,'yyyy-mon-dd hh24:mi:ss') from v$asm_disk; GROUP_NUMBER DISK_NUMBER NAME MOUNT_S STATE TOTAL_MB FREE_MB PATH TO_CHAR(MOUNT_DATE,' TO_CHAR(CREATE_DATE, ------------ ----------- ------------ ------- -------- ---------- ---------- -------------------------------------- -------------------- -------------------- 1 0 DATA01_0000 CACHED NORMAL 19031 17621 /dev/oracleasm/disks/DATA01 2014-sep-20 15:50:30 2014-sep-19 14:06:23 SQL> select group_number,name,type,state,total_mb,free_mb,compatibility,database_compatibility from v$asm_diskgroup; GROUP_NUMBER NAME TYPE STATE TOTAL_MB FREE_MB COMPATIBILIT DATABASE_COM ------------ ------------ ------ ----------- ---------- ---------- ------------ ------------ 1 DATA01 EXTERN MOUNTED 19031 17621 10.1.0.0.0 10.1.0.0.0 SQL> !asmcmd ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN N N 512 4096 1048576 19031 17621 0 17621 0 DATA01/ ASMCMD> ASMCMD> exit SQL> SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@oel1 ~]$ |
可以看到,当Oracle ASMLib的权限正常后,ASM DG的挂载就成功了。
ASM DG挂载成功的后台日志如下:
文件:/u01/app/oracle/admin/+ASM/bdump/alert_+ASM1.log
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 |
Sat Sep 20 17:18:04 CST 2014 SQL> alter diskgroup all mount Sat Sep 20 17:18:04 CST 2014 NOTE: cache registered group DATA01 number=1 incarn=0x2d2caf32 Sat Sep 20 17:18:04 CST 2014 NOTE: Hbeat: instance not first (grp 1) NOTE: cache opening disk 0 of grp 1: DATA01_0000 path:/dev/oracleasm/disks/DATA01 Sat Sep 20 17:18:04 CST 2014 NOTE: F1X0 found on disk 0 fcn 0.0 NOTE: cache mounting (not first) group 1/0x2D2CAF32 (DATA01) Sat Sep 20 17:18:04 CST 2014 kjbdomatt send to node 1 kjbdomatt send to node 2 Sat Sep 20 17:18:04 CST 2014 NOTE: attached to recovery domain 1 Sat Sep 20 17:18:05 CST 2014 NOTE: LGWR attempting to mount thread 2 for disk group 1 NOTE: LGWR mounted thread 2 for disk group 1 NOTE: opening chunk 2 at fcn 0.3356 ABA NOTE: seq=3 blk=6 Sat Sep 20 17:18:05 CST 2014 NOTE: cache mounting group 1/0x2D2CAF32 (DATA01) succeeded SUCCESS: diskgroup DATA01 was mounted Sat Sep 20 17:18:05 CST 2014 NOTE: recovering COD for group 1/0x2d2caf32 (DATA01) SUCCESS: completed COD recovery for group 1/0x2d2caf32 (DATA01) |
然后,启动节点一的数据库实例:
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 68 69 70 71 |
[oracle@oel1 ~]$ export ORACLE_SID=ORCL1 [oracle@oel1 ~]$ /u01/app/10g/grid/bin/crs_stat -t -v | grep --color inst ora....L1.inst application 0/5 0/0 OFFLINE OFFLINE ora....L2.inst application 0/5 0/0 OFFLINE OFFLINE ora....L3.inst application 0/5 0/0 ONLINE ONLINE oel3 [oracle@oel1 ~]$ [oracle@oel1 ~]$ ps -ef | grep ora_ oracle 20981 18561 0 17:21 pts/3 00:00:00 grep ora_ [oracle@oel1 ~]$ [oracle@oel1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Sep 20 17:21:52 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 599785472 bytes Fixed Size 2098112 bytes Variable Size 163580992 bytes Database Buffers 427819008 bytes Redo Buffers 6287360 bytes Database mounted. Database opened. SQL> SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ ORCL1 OPEN SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@oel1 ~]$ /u01/app/10g/grid/bin/crs_stat -t -v | grep --color inst ora....L1.inst application 0/5 0/0 ONLINE ONLINE oel1 ora....L2.inst application 0/5 0/0 OFFLINE OFFLINE ora....L3.inst application 0/5 0/0 ONLINE ONLINE oel3 [oracle@oel1 ~]$ ps -ef | grep ora_ oracle 21093 1 0 17:21 ? 00:00:00 ora_pmon_ORCL1 oracle 21095 1 0 17:21 ? 00:00:00 ora_diag_ORCL1 oracle 21097 1 0 17:21 ? 00:00:00 ora_psp0_ORCL1 oracle 21099 1 0 17:21 ? 00:00:00 ora_lmon_ORCL1 oracle 21101 1 0 17:21 ? 00:00:00 ora_lmd0_ORCL1 oracle 21103 1 0 17:21 ? 00:00:00 ora_lms0_ORCL1 oracle 21107 1 0 17:21 ? 00:00:00 ora_mman_ORCL1 oracle 21109 1 0 17:21 ? 00:00:00 ora_dbw0_ORCL1 oracle 21111 1 0 17:21 ? 00:00:00 ora_lgwr_ORCL1 oracle 21113 1 0 17:21 ? 00:00:00 ora_ckpt_ORCL1 oracle 21115 1 0 17:21 ? 00:00:00 ora_smon_ORCL1 oracle 21117 1 0 17:21 ? 00:00:00 ora_reco_ORCL1 oracle 21119 1 0 17:21 ? 00:00:00 ora_cjq0_ORCL1 oracle 21121 1 0 17:21 ? 00:00:00 ora_mmon_ORCL1 oracle 21128 1 0 17:21 ? 00:00:00 ora_mmnl_ORCL1 oracle 21130 1 0 17:21 ? 00:00:00 ora_d000_ORCL1 oracle 21132 1 0 17:21 ? 00:00:00 ora_s000_ORCL1 oracle 21150 1 0 17:21 ? 00:00:00 ora_lck0_ORCL1 oracle 21160 1 0 17:21 ? 00:00:00 ora_asmb_ORCL1 oracle 21164 1 0 17:21 ? 00:00:00 ora_rbal_ORCL1 oracle 21217 1 0 17:22 ? 00:00:00 ora_o000_ORCL1 oracle 21221 1 0 17:22 ? 00:00:00 ora_o001_ORCL1 oracle 21260 1 0 17:22 ? 00:00:00 ora_pz99_ORCL1 oracle 21293 1 0 17:22 ? 00:00:00 ora_qmnc_ORCL1 oracle 21396 1 0 17:22 ? 00:00:00 ora_q000_ORCL1 oracle 21398 1 0 17:22 ? 00:00:00 ora_q001_ORCL1 oracle 21474 18561 0 17:22 pts/3 00:00:00 grep ora_ [oracle@oel1 ~]$ |
数据库实例启动成功。
(其他的有类似问题的节点,按照如上方式予以解决即可。)
至此,RAC10g状态不正常的问题已经告终。
————————————————————————
Ending。