安裝GI後重啟作業系統後啟動ASM例項失敗及解決方法

stonebox1122發表於2015-06-07

安裝環境及過程參考http://blog.itpub.net/28536251/viewspace-1689235/

安裝完成後,重啟作業系統,啟動ASM例項報錯如下:

[grid@oragrid ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 7 16:21:31 2015

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

Connected to an idle instance.

SQL> startup

ORA-01078: failure in processing system parameters

ORA-29701: unable to connect to Cluster Synchronization Service

[grid@oragrid ~]$ crsctl check css

CRS-4639: Could not contact Oracle High Availability Services

CRS-4000: Command Check failed, or completed with errors.

[grid@oragrid ~]$ crsctl check has

CRS-4639: Could not contact Oracle High Availability Services

 

切換到root使用者執行啟動init.ohasd

[root@oragrid ~]# /bin/sh /etc/init.d/init.ohasd run &

[1] 8865

 

在切換到grid使用者check

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$ crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crsctl stat resource -t -init

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

               ONLINE  OFFLINE      oragrid

ora.LISTENER.lsnr

               ONLINE  OFFLINE      oragrid                  STARTING

ora.asm

               ONLINE  OFFLINE      oragrid                  Instance Shutdown

ora.ons

               OFFLINE OFFLINE      oragrid

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.cssd

      1        ONLINE  OFFLINE

ora.diskmon

      1        OFFLINE OFFLINE

ora.evmd

      1        ONLINE  OFFLINE                               STARTING

 

原來是開機啟動的init.ohasd沒有起作用,重新啟動一次就好了,也可以直接殺掉該程式,會自動重新生成一個。

 

[root@oragrid ~]# ps -ef | grep init.ohasd

root       972     1  0 22:01 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run

root      2474  2450  0 22:04 pts/0    00:00:00 grep init.ohasd

[root@oragrid ~]# kill -9 972

[root@oragrid ~]# ps -ef | grep init.ohasd

root      2538     1  0 22:05 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run

root      2638  2450  0 22:05 pts/0    00:00:00 grep init.ohasd

[root@oragrid ~]# su - grid

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$  crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.DATA.dg    ora....up.type ONLINE    ONLINE    oragrid

ora....ER.lsnr ora....er.type ONLINE    ONLINE    oragrid

ora.asm        ora.asm.type   ONLINE    ONLINE    oragrid

ora.cssd       ora.cssd.type  ONLINE    ONLINE    oragrid

ora.diskmon    ora....on.type OFFLINE   OFFLINE

ora.evmd       ora.evm.type   ONLINE    ONLINE    oragrid

ora.ons        ora.ons.type   OFFLINE   OFFLINE

 

再進入sqlplus就可以看到ASM例項已經啟動了。但是每次作業系統重啟都會出現這個問題,上述方法治標不治本,且沒有找到最終的原因,請教高手解決。

在網上找到這篇文章,http://blog.csdn.net/tianlesoftware/article/details/8207629,說這個問題是11.2.0.1bug,但是我現在安裝的版本是11.2.0.4,使用這篇文章的解決辦法,在root使用者下執行下面的命令:

[root@oragrid ~]# /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

^C0+0 records in

0+0 records out

0 bytes (0 B) copied, 13.6369 s, 0.0 kB/s

然後在grid使用者下檢視hascss狀態,可以看到已經啟動了

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$ crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.DATA.dg    ora....up.type ONLINE    ONLINE    oragrid

ora.FRA.dg     ora....up.type ONLINE    ONLINE    oragrid

ora....ER.lsnr ora....er.type ONLINE    ONLINE    oragrid

ora.asm        ora.asm.type   ONLINE    ONLINE    oragrid

ora.cssd       ora.cssd.type  ONLINE    ONLINE    oragrid

ora.diskmon    ora....on.type OFFLINE   OFFLINE

ora.evmd       ora.evm.type   ONLINE    ONLINE    oragrid

ora.ons        ora.ons.type   OFFLINE   OFFLINE

ora.stone.db   ora....se.type OFFLINE   OFFLINE

居然這個方法管用,但是系統重啟後問題依舊,難道這個bug11.2.0.4還存在嗎?


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

相關文章