10g rac下status經常有unknow的解決辦法

zuoluo2003發表於2014-08-05
先禁用crs服務,後啟用crs服務
(相當於從新啟動系統,因為crs是隨系統自動啟動的),需要在兩臺節點上都執行;
具體步驟:
節點1:
1、[root@rac1 ~]# /etc/init.d/init.crs stop
2、[root@rac1 ~]# su - oracle
  [oracle@rac1 ~]$ crs_stat -t
3、[oracle@rac1 ~]$ exit
   [root@rac1 ~]# /etc/init.d/init.crs start

4、[root@rac1 ~]# su - oracle
  [oracle@rac1 ~]$ crs_stat -t
節點2:
1、[root@rac2 ~]# /etc/init.d/init.crs stop
2、[root@rac2 ~]# su - oracle
   [oracle@rac2 ~]$ crs_stat -t

3、[root@rac2 ~]# /etc/init.d/init.crs start
4、[root@rac2 ~]# su - oracle
   [oracle@rac2 ~]$ crs_stat -t

方法二:可以使用crs_stop -f先強制停止服務,在啟動服務(在一臺節點上執行即可);
具體步驟:

[oracle@rac2 ~]$ crs_stop -f ora.rac1.ons
Attempting to stop `ora.rac1.ons` on member `rac1`
Stop of `ora.rac1.ons` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac1.ons
Attempting to start `ora.rac1.ons` on member `rac1`
Start of `ora.rac1.ons` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac2.ons
Attempting to stop `ora.rac2.ons` on member `rac2`
Stop of `ora.rac2.ons` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac2.ons
Attempting to start `ora.rac2.ons` on member `rac2`
Start of `ora.rac2.ons` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac1.gsd
Attempting to stop `ora.rac1.gsd` on member `rac1`
Stop of `ora.rac1.gsd` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac1.gsd
Attempting to start `ora.rac1.gsd` on member `rac1`
Start of `ora.rac1.gsd` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac2.gsd
Attempting to stop `ora.rac2.gsd` on member `rac2`
Stop of `ora.rac2.gsd` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac2.gsd
Attempting to start `ora.rac2.gsd` on member `rac2`
Start of `ora.rac2.gsd` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac1.LISTENER_RAC1.lsnr
Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac1.LISTENER_RAC1.lsnr
Attempting to start `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Start of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac2.LISTENER_RAC2.lsnr
Attempting to stop `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2`
Stop of `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac2.LISTENER_RAC2.lsnr
Attempting to start `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2`
Start of `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac1.ASM1.asm
Attempting to stop `ora.rac1.ASM1.asm` on member `rac1`
Stop of `ora.rac1.ASM1.asm` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac1.ASM1.asm
Attempting to start `ora.rac1.ASM1.asm` on member `rac1`
Start of `ora.rac1.ASM1.asm` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.rac2.ASM2.asm
Attempting to stop `ora.rac2.ASM2.asm` on member `rac2`
Stop of `ora.rac2.ASM2.asm` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.rac2.ASM2.asm
Attempting to start `ora.rac2.ASM2.asm` on member `rac2`
Start of `ora.rac2.ASM2.asm` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.ora9i.ora9i1.inst
`ora.ora9i.ora9i1.inst` is already OFFLINE.
CRS-0216: Could not stop resource 'ora.ora9i.ora9i1.inst'.

[oracle@rac2 ~]$ crs_start -f ora.ora9i.ora9i1.inst
Attempting to start `ora.ora9i.ora9i1.inst` on member `rac1`
Start of `ora.ora9i.ora9i1.inst` on member `rac1` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.ora9i.ora9i2.inst
`ora.ora9i.ora9i2.inst` is already OFFLINE.
CRS-0216: Could not stop resource 'ora.ora9i.ora9i2.inst'.

[oracle@rac2 ~]$ crs_start -f ora.ora9i.ora9i2.inst
Attempting to start `ora.ora9i.ora9i2.inst` on member `rac2`
Start of `ora.ora9i.ora9i2.inst` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_stop -f ora.ora9i.db
Attempting to stop `ora.ora9i.db` on member `rac2`
Stop of `ora.ora9i.db` on member `rac2` succeeded.
[oracle@rac2 ~]$ crs_start -f ora.ora9i.db
Attempting to start `ora.ora9i.db` on member `rac1`
Start of `ora.ora9i.db` on member `rac1` succeeded.
 
 
[oracle@rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.ora9i.db   application    ONLINE    ONLINE    rac1        
ora....i1.inst application    ONLINE    ONLINE    rac1        
ora....i2.inst application    ONLINE    ONLINE    rac2        
ora....SM1.asm application    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    ONLINE    ONLINE    rac1        
ora.rac1.ons   application    ONLINE    ONLINE    rac1        
ora.rac1.vip   application    ONLINE    ONLINE    rac1        
ora....SM2.asm application    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    ONLINE    ONLINE    rac2        
ora.rac2.vip   application    ONLINE    ONLINE    rac2

總結:在rac環境中如果使用crs_stop -all去停rac服務時,很有可能會出現crs中的一些服務的狀態是UNKNOWN,這時我們可以採用兩種方法去重新啟動crs服務:

1:轉換到root使用者下用/etc/init.d/init.crs stop先禁用crs,然後再用/etc/init.d/init.crs start去啟用crs,啟用crs後會自動啟動crs的一系列服務,注意此種方法需要在兩臺節點上都執行;

2:是用crs_stop -f  引數把crs中狀態是UNKNOWN的服務關掉,然後再用crs_start -f (加一個-f的引數)啟動所有的服務就可以。參考:

要分別在兩個節點上執行;

在啟動的過程中最好檢測著crs、ASM和資料庫的日誌:

crs日誌:
[oracle@rac1 ~]$ tail -f /u01/app/oracle/product/10.2.0/crs_1/log/rac1/alertrac1.log
[oracle@rac2 ~]$ tail -f /u01/app/oracle/product/10.2.0/crs_1/log/rac2/alertrac2.log

ASM日誌:
[oracle@rac1 ~]$ tail -f /u01/app/oracle/admin/+ASM/bdump/alert_+ASM1.log 
[oracle@rac2 ~]$ tail -f /u01/app/oracle/admin/+ASM/bdump/alert_+ASM2.log
資料庫日誌:
[oracle@rac1 ~]$ tail -f /u01/app/oracle/admin/ora9i/bdump/alert_ora9i1.log
[oracle@rac2 ~]$ tail -f /u01/app/oracle/admin/ora9i/bdump/alert_ora9i2.log


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

相關文章