rac的crs进程是做什么的_oracle rac后台进程介绍

oracle 集群包括两个部分组成:an upper stack cluster ready service daemon(CRSD) and a lower stack stack oracle hight availabilty service daemon(OHASD).这两个任务有如下几个进程组成:

• Cluster Ready Services (CRS): The primary program for managing high availability operations in a cluster.

The CRS daemon (crsd) manages cluster resources based on the configuration information that is stored in OCR for each resource. This includes start,stop,monitor,and failover operations. The crsd process generates events when the status of a resource changes. When you have Oracle RAC installed,the crsd process monitors the Oracle database instance,listener,and so on,and automatically restarts these components when a failure occurs.

• Cluster Synchronization Services (CSS): Manages the cluster configuration by controlling which nodes are members of the cluster and by notifying members when a node joins or leaves the cluster. If you are using certified third-party clusterware,then CSS processes interfaces with your clusterware to manage node membership information.

The cssdagent process monitors the cluster and provides I/O fencing. This service formerly was provided by Oracle Process Monitor Daemon (oprocd),also known as OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware restarting the node.

• Oracle ASM: Provides disk management for Oracle Clusterware.

• Cluster Time Synchronization Service (CTSS): Provides time management in a cluster for Oracle Clusterware.

• Event Management (EVM): A background process that publishes events that Oracle Clusterware creates.

• Oracle Notification Service (ONS): A publish and subscribe service for communicating Fast Application Notification (FAN) events.

• Oracle Agent (oraagent): Extends clusterware to support Oracle-specific requirements and complex resources. Runs server callout scripts when FAN events occur. This process was known as RACG in Oracle Clusterware 11g release 1 (11.1).

• Oracle Root Agent (orarootagent): A specialized oraagent process that helps crsd manage resources owned by root,such as the network,and the Grid virtual IP address.

The Cluster Synchronization Service (CSS),Event Management (EVM),and Oracle Notification Services (ONS) components communicate with other cluster component layers in the other instances in the same cluster database environment. These components are also the main communication links between Oracle Database,applications,and the Oracle Clusterware high availability components. In addition,these background processes monitor and manage database operations.

The Oracle High Availability Services Stack(OHAS)

The list in this section describes the processes that comprise the Oracle High Availability Services stack. The list includes components that are processes on Linux and UNIX operating systems,or services on Windows.

• Grid Plug and Play (gpnpd): GPNPD provides access to the Grid Plug and Play profile,and coordinates updates to the profile among the nodes of the cluster to ensure that all of the nodes node have the most recent profile.

• Grid Interprocess Communication (GIPC): A helper daemon for the communications infrastructure. Currently has no functionality; to be activated in a later release.

• Multicast Domain Name Service (mDNS): Allows DNS requests. The mDNS process is a background process on Linux and UNIX,and a service on Windows.

• Oracle Grid Naming Service (GNS): A gateway between the cluster mDNS and external DNS servers. The gnsd process performs name resolution within the cluster.

9b54650216826f9ad07b76c76c6049b9.png

主任务由以下组件构成:

CRS(cluster ready server):进程/u01/app/11.2.0/grid/bin/crsd.bin 负责集群的高可用操作。crs根据存储于OCR中的资源配置信息来管理这些资源。包括对数据库、实例、监听、虚拟IP、ons、gsd的启动、关闭、监控、故障切换等操作,由root用户管理。当一个资源发生变化时,crs生成一个事件。比如在安装rac时,crs会监控oracle实例、监听等,并在故障发生时自动启动这些组件。默认情况下,crs进程有5次重启操作,如果故障还没有排除则报错。

EVM(Event management):进程/u01/app/11.2.0/grid/bin/evmd.bin,发布crs创建事件后的后台进程。

ONS(Oracle Notification Service):进程/u01/app/11.2.0/grid/opmn/bin/ons,通信的快速应用通知(fan : fast application Notification)事件的发布及订阅服务。

CSS(cluster synchrinization server) :进程/u01/app/11.2.0/grid/bin/ocssd.bin 负责管理节点之间的关系,用于几点间的通信,节点在加入或离开集群时会通知集群。集群同步服务,管理集群配置,谁是成员,谁来,谁走,通知成员是集群环境中进程间的通信基础,同样,css也可以用于在单实例环境中处理ASM实例与常规rdbms实例之间的交互作用。css还维护一个心跳的过程,并监控投票磁盘的split-brain故障,在安装集群的最后阶段,要求在每个节点执行root.sh脚本,这个脚本会在/etc/inittab文件的追后把这3个进程加入启动项,所以每次系统启动时,集群进程也会随之启动。

OCR:健忘问题是由于每个节点都有配置信息的拷贝,修改节点信息不同步导致的。oracle采用的解决方案就是把这个配置文件放在共享存储上,这个文件就是OCR Disk。OCR中保存整个集群的配置信息,配置信息以“key-value”的形式保存。在oracle 10g 把配置信息记录在 /etc/oracle/ocr.loc或者 /etc/opt/oracle/ocr.loc(solaris)文件中。

Voting Disk(仲裁盘):Voting Disk这个文件主要用于记录节点成员状态,在出现故障时,决定哪个partion获得控制权,其他的partion必须从集群中剔除。在安装集群组件时也会提示制定安装位置,可以通过crsctl query css votedisk查询集群的仲裁盘信息。

failover流程如下:

(1)crs在检测到rac2节点一场后,会触发集群组件重构,最后把rac2几点剔除集群,由节点1组成新的集群。姁

(2)rac的failover机制会把节点2的vip转移到节点1上,这时节点1的public网卡上就有3个ip地址:vip1,vip2,public ip

(3)用户对vip2的连接请求会被IP层路由转到节点1.

(4)因为在节点1上只有vip2的地址,所有数据包会顺利通过路由层,网络层,传输层。

(5)但是,节点1上至箭筒vip1和public ip1的两个IP地址,并没有监听vip2,故应用层没有对应的程序可接受这个数据包,这个错误会立即被截获。

(6)客户端能够立即接受这个错误,然后客户端会重新发起vip1的连接请求。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值