大家好:
请问在RAC集群环境中,执行 crs_stat -t -v 命令查看集群资源状态时的 Target 列和 State 列的状态各代表什么意思?为什么要两个状态呢?如下:
[oracle@dbs tmp]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.gsd    application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.ons    application    0/3    0/0    ONLINE    ONLINE    dbp         
ora.dbp.vip    application    0/0    0/0    ONLINE    ONLINE    dbp         
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.gsd    application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.ons    application    0/3    0/0    ONLINE    ONLINE    dbs         
ora.dbs.vip    application    0/0    0/0    ONLINE    ONLINE    dbs         
ora.wxxrdb.db  application    0/1    0/1    ONLINE    ONLINE    dbp         
ora....b1.inst application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....b2.inst application    0/5    0/0    ONLINE    ONLINE    dbs         rac集群Oracle

解决方案 »

  1.   

    http://docs.oracle.com/cd/B28359_01/rac.111/b28255/crsref.htm#i1017277crs_statThe crs_stat command provides status information for resources on the cluster nodes. To query resources with the crs_stat command, the CRS resource permissions must have read and execute permissions (r and x permissions on Linux and UNIX systems). An exception is the -g option, that anyone can use to verify whether a resource exists.Resources are either ONLINE or OFFLINE as shown in the STATE attribute. An application resource in the ONLINE state is running successfully on a cluster node. This cluster node is shown indicating its state.The TARGET value shows the state to which Oracle Clusterware attempts to set the resource. If the TARGET value is ONLINE and a cluster node fails, then Oracle Clusterware attempts to restart the application on another node if possible. If there is a condition forcing a resource STATE to be OFFLINE, such as a required resource that is OFFLINE, then the TARGET value remains ONLINE and Oracle Clusterware attempts to start the application or application resource once the condition is corrected.A TARGET value for all non-application resources should be ONLINE unless the resource has a failure count higher than the failure threshold, in which case the TARGET is changed to OFFLINE. Oracle Clusterware then treats the resource as if its STATE were OFFLINE. If the STATE is ONLINE and the TARGET is OFFLINE, then you can reset the target value to ONLINE using the crs_start command.target是资源所在主机的状态,而state是资源是否可用用crs_stat看的比较清楚,
    crs_stat postmanNAME=postman
    TYPE=application
    TARGET=ONLINE
    STATE=ONLINE on rac2
      

  2.   

    target是资源所在目标的状态,state是资源是否可用。