some cases with RAC

[复制链接]
查看11 | 回复2 | 2009-1-4 14:52:28 | 显示全部楼层 |阅读模式
[oracle@rh4racdb02 bin]$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.4.0]
[oracle@rh4racdb02 bin]$ crs_stat -t
Name Type TargetState Host
------------------------------------------------------------
ora.racdb.db applicationONLINEONLINErh4racdb01
ora....b1.inst applicationONLINEONLINErh4racdb01
ora....b2.inst applicationONLINEONLINErh4racdb02
ora....SM1.asm applicationONLINEONLINErh4racdb01
ora....01.lsnr applicationONLINEONLINErh4racdb01
ora....b01.gsd applicationONLINEONLINErh4racdb01
ora....b01.ons applicationONLINEONLINErh4racdb01
ora....b01.vip applicationONLINEONLINErh4racdb01
ora....SM2.asm applicationONLINEONLINErh4racdb02
ora....02.lsnr applicationONLINEONLINErh4racdb02
ora....b02.gsd applicationONLINEONLINErh4racdb02
ora....b02.ons applicationONLINEONLINErh4racdb02
ora....b02.vip applicationONLINEONLINErh4racdb02
[oracle@rh4racdb02 bin]$ onsctl stop
onsctl: shutting down ons daemon ...
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
[oracle@rh4racdb02 bin]$ onsctl ping
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
ons is not running ...
[oracle@rh4racdb02 bin]$ crs_stat -t
Name Type TargetState Host
------------------------------------------------------------
ora.racdb.db applicationONLINEONLINErh4racdb01
ora....b1.inst applicationONLINEONLINErh4racdb01
ora....b2.inst applicationONLINEONLINErh4racdb02
ora....SM1.asm applicationONLINEONLINErh4racdb01
ora....01.lsnr applicationONLINEONLINErh4racdb01
ora....b01.gsd applicationONLINEONLINErh4racdb01
ora....b01.ons applicationONLINEONLINErh4racdb01
ora....b01.vip applicationONLINEONLINErh4racdb01
ora....SM2.asm applicationONLINEONLINErh4racdb02
ora....02.lsnr applicationONLINEONLINErh4racdb02
ora....b02.gsd applicationONLINEONLINErh4racdb02
ora....b02.ons applicationONLINEONLINErh4racdb02
ora....b02.vip applicationONLINEONLINErh4racdb02
[oracle@rh4racdb02 bin]$ ps -ef | grep opmn
oracle 16848 133310 11:12 pts/200:00:00 grep opmn
从最后一行看出,ons 相关的进程已经不存在了,所以推断这里onsctl 已经起到了作用,但为什么ctl_stat -t 仍然看到ons的状态还是online?
1 onsctl这里是不是没有起到作用,个人感觉确实起到了作用。
2 crs_stat 的信息是从什么地方读的?
[ 本帖最后由 Meets 于 2010-4-20 13:07 编辑 ]
回复

使用道具 举报

千问 | 2009-1-4 14:52:28 | 显示全部楼层
[oracle@rh4racdb02 bin]$ onsctl start
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
onsctl: ons started
[oracle@rh4racdb02 bin]$ ps -ef | grep opmn
oracle 19433 10 11:19 ?00:00:00 /u01/app/oracle/product/10.2.0/crs/opmn/bin/ons -d
oracle 19434 194331 11:19 ?00:00:00 /u01/app/oracle/product/10.2.0/crs/opmn/bin/ons -d
oracle 19499 133310 11:19 pts/200:00:00 grep opmn
[oracle@rh4racdb02 bin]$ onsctl ping
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
ons is running ...
整个过程中, crs_stat 里面显示的ONS 都是online 的。
回复

使用道具 举报

千问 | 2009-1-4 14:52:28 | 显示全部楼层
事实发现 onsctl 的结果和crs_stat 里面关于ONS resource 的结果很不一致:
[oracle@rh4racdb02 conf]$ crs_stop ora.rh4racdb01.ons
Attempting to stop `ora.rh4racdb01.ons` on member `rh4racdb01`
Stop of `ora.rh4racdb01.ons` on member `rh4racdb01` succeeded.
[oracle@rh4racdb02 conf]$ ps -ef| grep ons
root6525 10 10:51 ?00:00:00 sendmail: accepting connections
oracle 21013 10 11:23 ?00:00:00 /u01/app/oracle/product/10.2.0/crs/opmn/bin/ons -d
oracle 21014 210130 11:23 ?00:00:00 /u01/app/oracle/product/10.2.0/crs/opmn/bin/ons -d
oracle 27498 133310 13:13 pts/200:00:00 grep ons
[oracle@rh4racdb02 conf]$ onsctl ping
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
{node = rh4racdb01, port = 6200}
Adding remote host rh4racdb01:6200
onscfg[1]
{node = rh4racdb02, port = 4948}
Adding remote host rh4racdb02:4948
ons is running ...
[oracle@rh4racdb02 conf]$ crs_stat -t
Name Type TargetState Host
------------------------------------------------------------
ora.racdb.db applicationONLINEONLINErh4racdb01
ora....b1.inst applicationONLINEONLINErh4racdb01
ora....b2.inst applicationONLINEONLINErh4racdb02
ora....SM1.asm applicationONLINEONLINErh4racdb01
ora....01.lsnr applicationONLINEONLINErh4racdb01
ora....b01.gsd applicationONLINEONLINErh4racdb01
ora....b01.ons applicationOFFLINE OFFLINE

ora....b01.vip applicationONLINEONLINErh4racdb01
ora....SM2.asm applicationONLINEONLINErh4racdb02
ora....02.lsnr applicationONLINEONLINErh4racdb02
ora....b02.gsd applicationONLINEONLINErh4racdb02
ora....b02.ons applicationONLINEONLINErh4racdb02
ora....b02.vip applicationONLINEONLINErh4racdb02
[oracle@rh4racdb02 conf]$ crs_stat ora.rh4racdb01.ons
NAME=ora.rh4racdb01.ons
TYPE=application
TARGET=OFFLINE
STATE=OFFLINE
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行