基於asm的單例項資料庫啟動時報錯ORA-15032 ORA-15063一例

YallonKing發表於2012-09-19
基於asm的單例項資料庫啟動時報錯ORA-15032 ORA-15063一例

--報錯如下:
SQL> startup
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"

--檢視錯誤資訊:
[oracle@rhl5 ~]$ oerr ora 15032
15032, 00000, "not all alterations performed"
// *Cause:  At least one ALTER DISKGROUP action failed.
// *Action: Check the other messages issued along with this summary error.
//
[oracle@rhl5 ~]$ oerr ora 15063
15063, 00000, "ASM discovered an insufficient number of disks for diskgroup \"%s\""
// *Cause:  ASM was unable to find a sufficient number of disks belonging to the
//          diskgroup to continue the operation.
// *Action: Check that the disks in the diskgroup are present and functioning,
//          that the owner of the ORACLE binary has read/write permission to
//          the disks, and that the ASM_DISKSTRING initialization parameter
//          has been set correctly.  Verify that ASM discovers the appropriate
//          disks by querying V$ASM_DISK from the ASM instance.

--檢視asm的相關程式是否存在:
[oracle@rhl5 rules.d]$ ps -ef | grep ASM
oracle    4618     1  0 06:50 ?        00:00:00 asm_pmon_+ASM
oracle    4620     1  0 06:50 ?        00:00:00 asm_psp0_+ASM
oracle    4622     1  0 06:50 ?        00:00:00 asm_mman_+ASM
oracle    4624     1  0 06:50 ?        00:00:00 asm_dbw0_+ASM
oracle    4626     1  0 06:50 ?        00:00:00 asm_lgwr_+ASM
oracle    4628     1  0 06:50 ?        00:00:00 asm_ckpt_+ASM
oracle    4630     1  0 06:50 ?        00:00:00 asm_smon_+ASM
oracle    4632     1  0 06:50 ?        00:00:00 asm_rbal_+ASM
oracle    4634     1  0 06:50 ?        00:00:00 asm_gmon_+ASM
oracle    4636  4611  0 06:50 ?        00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    4697  4651  0 06:52 pts/2    00:00:00 grep ASM

--檢視磁碟組
SQL> select name,state from v$asm_diskgroup;

no rows selected

--試圖手動建立磁碟組
SQL> create diskgroup data external redundancy disk '/dev/racdisk1';
create diskgroup data external redundancy disk '/dev/racdisk1'
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/racdisk1' matches no disks
ORA-15025: could not open disk '/dev/racdisk1'
ORA-15056: additional error message
Linux Error: 13: Permission denied
Additional information: 42
Additional information: 141148497
Additional information: 213724448

--檢視asm引數檔案
[oracle@rhl5 ~]$ strings  /u01/app/oracle/product/10.2.0/db_1/dbs/spfile+ASM.ora
6q0/
+ASM.asm_diskgroups='DATA'#Manual Mount
*.asm_diskgroups='DATA'
*.asm_diskstring='/dev/racdisk1'
*.background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/u01/app/oracle/admin/+ASM/udump'

--檢視磁碟讀寫許可權並修改許可權
[root@rhl5 dev]# ls -l rac*
brw-rw---- 1 grid asmadmin 8, 16 Sep 19 06:43 racdisk1
[root@rhl5 dev]# chmod 777 rac*
[root@rhl5 dev]# ls -l rac*
brwxrwxrwx 1 grid asmadmin 8, 16 Sep 19 06:43 racdisk1

--正常啟動asm(掛載磁碟組)
[oracle@rhl5 ~]$ export ORACLE_SID=+ASM
[oracle@rhl5 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 19 07:12:17 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted

--正常啟動資料庫
[oracle@rhl5 ~]$ env | grep ORACLE_SID
ORACLE_SID=ora10gr2
[oracle@rhl5 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 19 07:13:58 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> select open_mode from v$database;
select open_mode from v$database
                      *
ERROR at line 1:
ORA-01507: database not mounted


SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1220844 bytes
Variable Size             159387412 bytes
Database Buffers          444596224 bytes
Redo Buffers                2969600 bytes
Database mounted.
Database opened.



總結:此例是由於asm磁碟組的許可權出現問題導致asm磁碟無法正常掛載導致的。修改相應許可權即可。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26143577/viewspace-744264/,如需轉載,請註明出處,否則將追究法律責任。

相關文章