處理crs_stat -t狀態unknown一例

wisdomone1發表於2010-04-13


---基本所有resource狀態全是unknown
-bash-3.00$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....SM1.asm application    OFFLINE   UNKNOWN   capitek1    
ora....K1.lsnr application    OFFLINE   UNKNOWN   capitek1    
ora....ek1.gsd application    ONLINE    UNKNOWN   capitek1    
ora....ek1.ons application    ONLINE    UNKNOWN   capitek1    
ora....ek1.vip application    OFFLINE   UNKNOWN   capitek1    
ora....SM2.asm application    OFFLINE   UNKNOWN   capitek2    
ora....K2.lsnr application    OFFLINE   UNKNOWN   capitek2    
ora....ek2.gsd application    ONLINE    UNKNOWN   capitek2    
ora....ek2.ons application    ONLINE    UNKNOWN   capitek2    
ora....ek2.vip application    OFFLINE   UNKNOWN   capitek2    
ora.only.db    application    ONLINE    UNKNOWN   capitek1    
ora....y1.inst application    OFFLINE   OFFLINE               
ora....y2.inst application    OFFLINE   OFFLINE               
ora....ice1.cs application    ONLINE    UNKNOWN   capitek1    
ora....ly1.srv application    ONLINE    UNKNOWN   capitek1    
ora....ice2.cs application    ONLINE    UNKNOWN   capitek1    
ora....ly1.srv application    ONLINE    UNKNOWN   capitek1    
ora....ly2.srv application    ONLINE    UNKNOWN   capitek2    
-bash-3.00$ exit
logout

---直接停止crs程式
[root@capitek1 rc.d]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.

---ons程式仍在
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     18712  4640  0 01:20 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# su - oracle
-bash-3.00$ crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.


----嘗試重啟crs程式,結果css及evm並沒有啟動
-bash-3.00$ exit
logout
[root@capitek1 rc.d]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     18970  4640  0 01:20 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     18972  4640  0 01:20 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     18974  4640  0 01:20 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     18976  4640  0 01:20 pts/0    00:00:00 grep crs


---說明crs程式啟動會遞迴呼叫很多指令碼,請看有crsctl這個命令,有興趣的同學可以深入研究下,對於troubleshuting大有作用
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19036 19003  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19003
oracle   19037 19036  0 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19003
oracle   19057 19037  0 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19060  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19036 19003  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19003
oracle   19037 19036  1 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19003
oracle   19057 19037  4 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19112 19061  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19061
oracle   19113 19112  1 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19061
oracle   19140 19113  2 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19150 19081  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19081
oracle   19151 19150  1 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19081
oracle   19171 19151  0 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19174  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19112 19061  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19061
oracle   19113 19112  0 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19061
oracle   19140 19113  1 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19150 19081  0 01:21 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19081
oracle   19151 19150  0 01:21 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check boot > /tmp/crsctl.19081
oracle   19171 19151  2 01:21 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl.bin check boot
root     19179  4640  0 01:21 pts/0    00:00:00 grep crs



---經過上面中間指令碼的呼叫結束後,evm,css程式仍舊沒有啟動
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19187  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19189  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19191  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19193  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19195  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19197  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
root     19199  4640  0 01:21 pts/0    00:00:00 grep crs
[root@capitek1 rc.d]# /etc/init.d/init.c
init.crs   init.crsd  init.cssd  


---嘗試單獨啟動css程式,瞧!evm,css程式全部活動起來
[root@capitek1 rc.d]# /etc/init.d/init.cssd start
Startup will be queued to init within 90 seconds.
[root@capitek1 rc.d]# ps -ef|grep crs
oracle    6405     1  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
oracle    6406  6405  0 01:15 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/opmn/bin/ons -d
root     18464     1  0 01:19 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/crsd.bin reboot
root     18472     1  0 01:19 ?        00:00:00 /bin/su -l oracle -c sh -c 'ulimit -c unlimited; cd /u01/app/oracle/product/10.2.0/crs_1/log/capitek1/evmd; exec /u01/app/oracle/product/10.2.0/crs_1/bin/evmd '
oracle   19253 18472  5 01:22 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/evmd.bin
root     19351 19239  0 01:22 ?        00:00:00 /bin/su -l oracle -c /bin/sh -c 'ulimit -c unlimited; cd /u01/app/oracle/product/10.2.0/crs_1/log/capitek1/cssd;  /u01/app/oracle/product/10.2.0/crs_1/bin/ocssd  || exit $?'
oracle   19352 19351  1 01:22 ?        00:00:00 /bin/sh -c ulimit -c unlimited; cd /u01/app/oracle/product/10.2.0/crs_1/log/capitek1/cssd;  /u01/app/oracle/product/10.2.0/crs_1/bin/ocssd  || exit $?
oracle   19372 19352  2 01:22 ?        00:00:00 /u01/app/oracle/product/10.2.0/crs_1/bin/ocssd.bin




小結:
1,對於rac各程式的依賴關係掌握不深入?css,evm,css?需要再查閱文件!
2,crs_stat -t的狀態為unknown,是何因造成呢,我這種處理方法,在生產環境上適用性如何?

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

相關文章