转 11g RAC R2 体系结构---Grid

基于agent的管理方式

  从oracle 11.2开始出现了多用户的概念,oracle开始使用一组多线程的daemon来同时支持多个用户的使用、管理资源,这些daemon叫做Agent。这些Agent都是些常驻内存的进程.

Agent的分类

  • oracle grid 11.2的agent有多个,其中两个最重要的是oracle agnet和oracle root agent。
  • oracle agnet 是以oracle用户身份运行(这个oracle用户是泛指,根据场合不同可能是grid,也可能是oracle)
  • oracle root agent是以root用户身份运行 这个两个agent对应的操作系统的进程的名字是:oraagent和orarootagent
  • OHAS栈会启动一套oracle agnet和oracle root agent。由OHAS启动的oracle agnet是用Grid的安装用户身份运行的。
  • CRS栈也会启动一套oracle agnet和oracle root agent。如果安装Grid的用户不是oracle,而是grid。则会启动两个oracle agnet。

Agent和资源的关系图

http://www.cnblogs.com/polestar/p/4189921.html

crsctl stop res -all 
crsctl start res -all 
crsctl status res -t

crsctl status res -t -init

crsctl start/stop cluster 命令只是控制Start CRS stack(ora.cssdmonitor,ora.cssd,ora.diskmon,ora.ctssd,ora.asm,ora.crsd)。

      使用命令 crsctl start/stop cluster 的前提是OHASD进程已经被启动

结论:crsctl start/stop crs  管理 CRS 包含进程 OHASD ;

   crsctl start/stop cluster 不包含OHASD进程,必须要先启动 OHASD 进程才可以使用

################


1) Connect to node #1, then please check if the CRS/OHAS & services are enabled to autostart as follow (repeat this step on each node):

# $GRID_ORACLE_HOME/bin/crsctl config crs


2) If not, then you can enable it as follow (repeat this step on each node):

# $GRID_ORACLE_HOME/bin/crsctl enable crs

3) Shutdown the services on each node as follow:

# $GRID_ORACLE_HOME/bin/crsctl stop crs


4) Verify the services were/are down (repeat this step on each node):

# $GRID_ORACLE_HOME/bin/crsctl status resource -t


5) Then start the services on node #1 as follow (only on first node):

# $GRID_ORACLE_HOME/bin/crsctl start crs


6) Wait 1 minute, then validate the services started & diskgroups were mounted (only on first node):

# $GRID_ORACLE_HOME/bin/crsctl status resource -t


7) Then start the services on node #2 as follow:

# $GRID_ORACLE_HOME/bin/crsctl start crs

8) Wait 1 minute, then validate the services started & diskgroups were mounted on node #2:

# $GRID_ORACLE_HOME/bin/crsctl status resource -t


9) If there are more nodes in the RAC, then repeat the same steps (7-8).

10) Then check the status of the clusterware globally as follows:

# crsctl check cluster -all

Sample output:

[root@asmgrid1 ~]# crsctl check cluster -all
**************************************************************
asmgrid1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

asmgrid2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

Note 1: Alternatively, you can stop and start the cluster globally as follows:

Stop:
[root@asmgrid1 ~]# crsctl stop cluster -all [-f]

Start:
[root@asmgrid1 ~]# crsctl start cluster -all

原文地址:https://www.cnblogs.com/feiyun8616/p/7201323.html