在手動寫ASM參數檔案後啟動ASM遇到一個問題,在啟動asm執行個體的時候提示:
ORA-29701 :unable to connect to Cluster Manager
通過對於聯機文檔的解讀,我瞭解到是沒有添加CSS服務的原因,好,下面我們在root使用者下執行/u01/app/Oracle/product/10.2/db_1/bin/localconfig add命令去添加CSS服務,好!問題解決,但是在啟動asm執行個體卻報了ORA-15110: nodiskgroups mounted 錯誤(啟動執行個體的時候出現ORA-15110錯誤非常正常,因為我之前還沒有建立diskgroup)
SQL>select path,mount_status from v$asm_disk order by disk_number;
PATH MOUNT_S
-------------------------------------------------- -------
ORCL:VOL01 CLOSED
ORCL:VOL02 CLOSED
查看磁碟的狀態,如果沒有看到,則是設定的asm_diskstring參數不正確,需要調整。
PATH MOUNT_S
---------------------------------------------------------
ORCL:VOL01 CACHED
ORCL:VOL02 CACHED
建立磁碟組
SQL>create diskgroup syasm normal redundancy disk 'ORCL:VOL01';
SQL> alterdiskgroup syasm add disk 'ORCL:VOL02';
Diskgroupcreated.
建立磁碟組後,重新查詢v$asm_disk視圖,發現ASM磁碟的狀態由closed變成cached
SQL>select path,mount_status from v$asm_disk order by disk_number;
PATH MOUNT_S
-------------------------------------------------- -------
ORCL:VOL01 CACHED
ORCL:VOL02 CACHED
建立spfile,重啟執行個體
SQL>create spfile from pfile;
File created.
SQL>shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 92274688 bytes
Fixed Size 1217884 bytes
Variable Size 65890980 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
無法啟動磁碟組,並報ORA-15110錯誤,決定通過手動方式啟動磁碟組
SQL> alterdiskgroup all mount;
alterdiskgroup all mount
*
ERROR at line1:
ORA-15110: nodiskgroups mounted
手動也無法啟動,是什麼問題呢~
通過SQL>show paramter asm;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string
asm_diskstring string
asm_power_limit integer 1
asm_diskgroups後面的值竟然是空置,難怪磁碟組會起不來,手動加上!
SQL>altersystem set asm_diskgroups=SHIYUEASM scope=both;
好!再次啟動磁碟組!
SQL> alterdiskgroup all mount;
SQL>startup
ASM instance started
Total System Global Area 92274688 bytes
Fixed Size 1217884 bytes
Variable Size 65890980 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
磁碟組起來了,手動建立ASM磁碟組完成!