磁碟組不能自動掛載

lhrbest發表於2017-02-25

磁碟組不能自動掛載的原因有2:

1 、asm_diskgroups 不能為空,需要配置所有的磁碟組
2、磁碟組的屬性AUTO_START應該設定為always,該問題是bug  8663101 :  修改用 crsctl modify resource ora.DATA.dg -attr AUTO_START=always,查詢用:crsctl stat res ora.OCR.dg  -p 




[grid@node1 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 25 06:32:37 2017


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


SQL> show parameter disk


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      ARCH, TEST, DATA, OCR
asm_diskstring                       string      /dev/asm*, ORCL:ARCHDISK, ORCL
                                                 :DATADISK, ORCL:OVDISK
SQL> create pfile='/tmp/a.txt' from spfile;


File created.


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@node1 ~]$ more /tmp/a.txt
+ASM2.__oracle_base='/u01/app'#ORACLE_BASE set from in memory value
+ASM1.__oracle_base='/u01/app/'#ORACLE_BASE set from in memory value
+ASM1.asm_diskgroups='ARCH','TEST','DATA','OCR'#Manual Mount
+ASM2.asm_diskgroups='ARCH','DATA','TEST','OCR'#Manual Mount
*.asm_diskstring='/dev/asm*','ORCL:ARCHDISK','ORCL:DATADISK','ORCL:OVDISK'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
[grid@node1 ~]$ 



[root@rac1 ~]# srvctl start diskgroup -g data -n "rac2"
[root@rac1 ~]# srvctl start diskgroup -g oradata -n "rac2"
[root@rac1 ~]# srvctl start diskgroup -g oradata -n "rac1"
[root@rac1 ~]# su - grid
[grid@rac1:/home/grid]$crsctl modify resource ora.DATA.dg -attr AUTO_START=always
[grid@rac1:/home/grid]$crsctl modify resource ora.ORADATA.dg -attr AUTO_START=always
[grid@rac1:/home/grid]$crsctl modify resource ora.ARCH.dg -attr AUTO_START=always
[grid@rac1:/home/grid]$crsctl modify resource ora.OCR.dg -attr AUTO_START=always

多次測試  所有磁碟均能正常掛載

該解決辦法出自 ID:1065158.1  問題原因可能涉及到11.2.0.1的一個BUG  bug 8663101   該BUG 在12.2.0.2已經被修復    

下一步 該升級資料庫了

1. Manually start the diskgroup:    srvctl start diskgroup -g <dg_name> [-n "<node_list>"]
or
2. Modify the attribute AUTO_START to "always"
    
crsctl modify resource ora.<diskgroup>.dg -attr AUTO_START=always


單擊此項可新增到收藏夾 Diskgroup resource shows status offline after restart even it is mounted in ASM instance (文件 ID 1065158.1) 轉到底部轉到底部

In this Document

Symptoms
Changes
Cause
Solution
References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1.0 and later
Information in this document applies to any platform.

SYMPTOMS

After restart the 11.2 HAS stack, the diskgroup (.dg) resource is showing "OFFLINE" status, but diskgroup is mounted in the ASM instance.

For example:

$ crsctl stat res ora.DATA.dg

NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
TARGET=OFFLINE, ONLINE
STATE=OFFLINE, ONLINE on host1


From ASM when you query , the diskgroup shows as mounted.

SQL> conn / as sysdba
Connected.
SQL> select name,state from v$asm_diskgroup;

NAME                            STATE
------------------------------ -----------
DATA                             MOUNTED

CHANGES

From the crsd.log:

2010-02-05 16:05:09.988: [    A**][56] ora.DATA.dg host1 1 received state from probe request. Old state = UNKNOWN, New state = OFFLINE


From oraagent_oracle.log:

2010-02-05 16:05:09.799: [    A**][9] ora.DATA.dg host1 1 state changed from: UNKNOWN to: OFFLINE

CAUSE

This is caused by an unpublished bug 8663101 11.2 DG RES OFFLINE, BUT DISKGROUP MOUNTED AFTER RESTART HAS STACK 

The diskgroup is mounted in asm before crsd is up so crsd is never notified of the diskgroup resource start. 

SOLUTION

The bug has been fixed in 11.2.0.2 patchset.

Two workarounds available:

1. Manually start the diskgroup:
    srvctl start diskgroup -g <dg_name> [-n "<node_list>"]

or
2. Modify the attribute AUTO_START to "always"
     crsctl modify resource ora.<diskgroup>.dg -attr AUTO_START=always

REFERENCES


NOTE:1060920.1 - ALERT.LOG for ASM Shows "WARNING: failed to online diskgroup resource ora.GI.dg (unable to communicate with CRSD/OHASD)"

About Me

...............................................................................................................................

● 本文整理自網路

● QQ群:230161599     微信群:私聊

● 聯絡我請加QQ好友(642808185),註明新增緣由

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

...............................................................................................................................

拿起手機使用微信客戶端掃描下邊的左邊圖片來關注小麥苗的微信公眾號:xiaomaimiaolhr,掃描右邊的二維碼加入小麥苗的QQ群,學習最實用的資料庫技術。

 磁碟組不能自動掛載  DBA筆試面試講解




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

相關文章