广告
返回顶部
首页 > 资讯 > 数据库 >has、ohasd、crs、cluster区别和联系是怎样的
  • 765
分享到

has、ohasd、crs、cluster区别和联系是怎样的

2024-04-02 19:04:59 765人浏览 安东尼
摘要

这篇文章将为大家详细讲解有关has、ohasd、crs、cluster区别和联系是怎样的,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

这篇文章将为大家详细讲解有关has、ohasd、crs、cluster区别和联系是怎样的,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

has高可用服务,用在restart环境,可以是单机环境也可以是RAC环境,不管单机环境还是RAC环境,都可以执行crsctl check has,在RAC环境下,可以简单理解成cluster的一部分
ohasd是has后台进程的概念
crs集群就绪服务,用在RAC环境,单机环境不能执行crsctl check crs,crsctl start CRS不单单启动CRSD了,等于启动OHASD、CRSD、CSSD三者了
cluster就是集群的意思,用在RAC环境,单机环境不能执行crsctl check cluster

单机环境无法执行crsctl check crs、crsctl check cluster,但是可以执行crsctl stat res、crsctl check css、crsctl check has

Oracle high availability services(HAS)
oracle Restart uses Oracle high availability services to start and stop automatically the components managed by Oracle Restart. For example, Oracle high availability services daemons automatically start databases, listeners, and Oracle ASM instances. When Oracle high availability services are disabled, none of the components managed by Oracle Restart are started when a node is rebooted.
Oracle Restart使用Oracle高可用性服务来自动启动和停止由Oracle Restart管理的组件。 例如,Oracle高可用性服务守护进程自动启动数据库,侦听器和Oracle ASM实例。 当Oracle高可用性服务被禁用时,重启节点时将不启动Oracle Restart管理的组件。
crsctl command has

where command is a verb such as start, stop, or enable. The has object indicates Oracle high availability services
check   Displays the Oracle Restart status.
config  Displays the Oracle Restart configuration.
disable Disables automatic restart of Oracle Restart.
enable  Enables automatic restart of Oracle Restart.
start   Starts Oracle Restart.
stop    Stops Oracle Restart.


Oracle High Availability Services Daemon(OHASD) 
This process anchors the lower part of the Oracle Clusterware stack, which consists of processes that facilitate cluster operations.
Oracle Restart improves the availability of your Oracle database. When you install OracleRestart, various Oracle components can be automatically restarted after ahardware or software failure or whenever your database host computer restarts.
此过程将固定Oracle Clusterware堆栈的较低部分,该堆栈由促进群集操作的进程组成。
Oracle Restart 能提高数据库的可用性,当安装了Oracle Restart 之后,在系统出现硬件或者软件问题,或者主机重启之后,OracleRestart管理的组件都能自动的进行启动。
OHASD是一个后台的守护进程,其可用来启动和监控OracleRestart进程。该进程由/etc/init.d/ohasd 脚本来初始化,并由root用户来执行ohasd.bin来启动,如下
[root@pdba ~]# ps -ef|grep has|grep -v grep
root      5281     1  0 Jun25 ?        14:28:09 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
root     13261     1  0 Jun25 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run

OHASD无法kill,一旦kill,立马又会被拉起了(参考/etc/initab中的respawn含义)
[root@TEST ~]# cat /etc/inittab|grep init.ohasd  
h2:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1
Note: Oracle linux 6 (OL6) or Red Hat Linux 6 (RHEL6) has deprecated inittab, rather, init.ohasd will be configured via upstart in /etc/init/oracle-ohasd.conf, however, the process ""/etc/init.d/init.ohasd run" should still be up. Oracle Linux 7 (and Red Hat Linux 7) uses systemd to manage start/stop services (example: /etc/systemd/system/oracle-ohasd.service)
注意:Oracle Linux 6(OL6)或Red Hat Linux 6(RHEL6)已经弃用了inittab,相反,init.ohasd将通过/etc/init/oracle-ohasd.conf中的upstart配置,但是,进程“/etc/init.d/init.ohasd run“仍然应该启动,Oracle Linux 7(和Red Hat Linux 7)使用systemd来管理启动/停止服务(例如:/etc/systemd/system/oracle-ohasd.service)

[root@pdba ~]# cat /etc/issue
Centos release 6.8 (Final)
Kernel \r on an \m

[root@pdba ~]# cat /etc/init/oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
start on runlevel [35]
stop  on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1

对于standalone server,使用OHASD来管理Oracle Restart,并且不需要CRSD进程的支持。可以使用OHASD管理的组件如下:
1.CSSD: This is used for Group Services as it was inprevious releases (when it was installed using “localconfig add“)
2.ASM Instance :if Automatic Storage Management is used.
3.ASM Disk Groups: if Automatic Storage Management is used.
4.Listeners
5.Database Instances
6.Database Services
7.ONS/EONS :Used for automatic failover of connections  usingFast Application Notification (FAN) in a Data Guard environment


Cluster Ready Services (CRS)

Cluster Ready Services Daemon (CRSD)
The primary Oracle Clusterware process that perfORMs high availability recovery and management operations, such as maintaining OCR. Also manages application resources and runs as root user (or by a user in the admin group on Mac OS X-based systems) and restarts automatically upon failure.
执行高可用性恢复和管理操作(如维护OCR)的主要Oracle Clusterware进程。 还管理应用程序资源并以root用户(或基于Mac OS X的系统上的管理员组中的用户)身份运行,并在失败时自动重新启动。

[root@pdb02 ~]# ps -ef|grep crs|grep -v grep
root      3672     1  0 13:15 ?        00:00:48 /u01/app/11.2.0/grid/bin/crsd.bin reboot


Cluster
Oracle Clusterware enables servers to communicate with each other, so that they appear to function as a collective unit. This combination of servers is commonly known as a cluster. Although the servers are standalone servers, each server has additional processes that communicate with other servers. In this way the separate servers appear as if they are one system to applications and end users.
Oracle集群件使服务器能够相互通信,以使它们看起来像是一个集体单元。 这种服务器组合通常被称为集群。 虽然服务器是独立的服务器,但每台服务器都有其他的进程与其他服务器通信。 通过这种方式,独立服务器看起来好像是应用程序和最终用户的一个系统。


CRS
crsctl start crs
Use the crsctl start crs command to start Oracle High Availability Services on the local server.
crsctl check crs
Use the crsctl check crs command to check the status of Oracle High Availability Services and the Oracle Clusterware stack on the local server.
crsctl stop crs
Use the crsctl stop crs command to stop Oracle High Availability Services on the local server.

cluster
crsctl start cluster
Use the crsctl start cluster command on any node in the cluster to start the Oracle Clusterware stack.
crsctl check cluster
Use the crsctl check cluster command on any node in the cluster to check the status of the Oracle Clusterware stack.
crsctl stop cluster
Use the crsctl stop cluster command on any node in the cluster to stop the Oracle Clusterware stack on all servers in the cluster or specific servers.

has
crsctl start has
Use the crsctl start has command to start Oracle High Availability Services on the local server
crsctl check has
Use the crsctl check has command to check the status of ohasd.
crsctl stop has
Use the crsctl stop has command to stop Oracle High Availability Services on the local server


RAC的一台节点执行的结果
[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl config crs
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl config cluster
Parse error:
  'cluster' is an invalid argument

[root@node1 grid]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
----crsctl start CRS不单单启动CRSD了,等于启动OHASD、CRSD、CSSD三者了

[root@node1 grid]# crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[root@pdba ~]# crsctl check has
CRS-4638: Oracle High Availability Services is online

crsctl check cssd被crsctl check css取代了
[root@node1 ~]# crsctl check cssd
CRS-272: This command remains for backward compatibility only
Cluster Synchronization Services is online

crsctl check crsd被crsctl check crs取代了
[root@node1 grid]# crsctl check crsd
CRS-272: This command remains for backward compatibility only
Cluster Ready Services is online
但是没有crsctl start cssd、crsctl start crsd这样的命令


RAC的一台节点执行的结果
[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.

[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4640: Oracle High Availability Services is already active
CRS-4000: Command Start failed, or completed with errors.

[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl check has
CRS-4638: Oracle High Availability Services is online

[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'pdb02'
CRS-2673: Attempting to stop 'ora.crsd' on 'pdb02'
CRS-2677: Stop of 'ora.crsd' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'pdb02'
CRS-2673: Attempting to stop 'ora.ctssd' on 'pdb02'
CRS-2673: Attempting to stop 'ora.evmd' on 'pdb02'
CRS-2673: Attempting to stop 'ora.asm' on 'pdb02'
CRS-2677: Stop of 'ora.ctssd' on 'pdb02' succeeded
CRS-2677: Stop of 'ora.evmd' on 'pdb02' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'pdb02' succeeded
CRS-2677: Stop of 'ora.asm' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'pdb02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'pdb02'
CRS-2677: Stop of 'ora.cssd' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'pdb02'
CRS-2677: Stop of 'ora.crf' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'pdb02'
CRS-2677: Stop of 'ora.gipcd' on 'pdb02' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'pdb02'
CRS-2677: Stop of 'ora.gpnpd' on 'pdb02' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'pdb02' has completed
CRS-4133: Oracle High Availability Services has been stopped

[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl check has
CRS-4639: Could not contact Oracle High Availability Services

[root@pdb02 ~]# /u01/app/11.2.0/grid/bin/crsctl stop has
CRS-2796: The command may not proceed when Cluster Ready Services is not running
CRS-4687: Shutdown command has completed with errors.
CRS-4000: Command Stop failed, or completed with errors.


单机执行的结果
[root@GiOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.

[root@GIOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl start has
CRS-4640: Oracle High Availability Services is already active
CRS-4000: Command Start failed, or completed with errors.

[root@GIOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl check has
CRS-4638: Oracle High Availability Services is online

[root@GIOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'giosonly'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'giosonly'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'giosonly'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'giosonly' succeeded
CRS-5022: Stop of resource "ora.DATA.dg" failed: current state is "UNKNOWN"
CRS-2675: Stop of 'ora.DATA.dg' on 'giosonly' failed
CRS-2679: Attempting to clean 'ora.DATA.dg' on 'giosonly'
CRS-2681: Clean of 'ora.DATA.dg' on 'giosonly' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'giosonly'
CRS-2677: Stop of 'ora.asm' on 'giosonly' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'giosonly'
CRS-2677: Stop of 'ora.cssd' on 'giosonly' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'giosonly'
CRS-2677: Stop of 'ora.evmd' on 'giosonly' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'giosonly' has completed
CRS-4133: Oracle High Availability Services has been stopped.

[root@GIOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl check has
CRS-4639: Could not contact Oracle High Availability Services

[root@GIOSONLY app]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl stop has
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.

关于has、ohasd、crs、cluster区别和联系是怎样的就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

您可能感兴趣的文档:

--结束END--

本文标题: has、ohasd、crs、cluster区别和联系是怎样的

本文链接: https://www.lsjlt.com/news/66016.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • has、ohasd、crs、cluster区别和联系是怎样的
    这篇文章将为大家详细讲解有关has、ohasd、crs、cluster区别和联系是怎样的,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。 ...
    99+
    2022-10-19
  • javaSE中的==和equals的联系与区别是怎样的
    这篇文章给大家介绍javaSE中的==和equals的联系与区别是怎样的,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。写在前面:==和equals是我们面试中经常会碰到的问题。那么它们之间有什么联系和区别呢?今天我们就...
    99+
    2023-06-03
  • DIV和table页面布局的区别和联系是怎样的
    这期内容当中小编将会给大家带来有关DIV和table页面布局的区别和联系是怎样的,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。向大家描述一下DIV和Table页面布局的区...
    99+
    2022-10-19
  • 怎样分析cookie与SESSION的区别和联系
    怎样分析cookie与SESSION的区别和联系,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。在一些投票之类的场合,我们往往因为公平的原则要求每人只能投一票,在一些WEB开发中...
    99+
    2023-06-03
  • unix和linux的区别与联系是什么
    这篇文章主要介绍“unix和linux的区别与联系是什么”,在日常操作中,相信很多人在unix和linux的区别与联系是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”unix和linux的区别与联系是什么...
    99+
    2023-06-14
  • JSP和serverlet的区别与联系是什么
    JSP(JavaServer Pages)和Servlet(Java Servlet)是Java Web开发中常用的两种技术,有以下...
    99+
    2023-08-15
    JSP serverlet
  • Session和Cookie的区别与联系是什么
    Session和Cookie是两种不同的机制,用于在Web应用中保存用户状态信息。区别:1. 存储位置:Cookie存储在客户端(浏...
    99+
    2023-08-15
    Session Cookie
  • LR和SVM的联系与区别是什么
    这篇文章主要介绍“LR和SVM的联系与区别是什么”,在日常操作中,相信很多人在LR和SVM的联系与区别是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”LR和SVM的联系与区别是什么”的疑惑有所帮助!接下来...
    99+
    2023-06-19
  • 云服务器和数据库的区别和联系与区别是什么
    云服务器和数据库都是常用的网络存储和数据备份解决方案,但它们在一些方面存在一些明显的区别。 云服务器是一种虚拟化服务器,用户只需访问服务器的一个或多个磁盘空间,而无需访问物理计算机或存储设备。它们通常用于数据备份,因为它们提供了一个更高效...
    99+
    2023-10-27
    区别 服务器 数据库
  • javaSE中的==和equals的联系与区别是什么
    本篇内容主要讲解“javaSE中的==和equals的联系与区别是什么”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“javaSE中的==和equals的联系与区别是什么”吧!问题这里先抛出一些比...
    99+
    2023-06-16
  • 云服务器和虚拟主机的区别和联系与区别是什么
    云服务器(Cloud Hosting)是一种提供在线服务器托管和虚拟主机服务的服务。用户可以通过租用云服务器来构建自己的网站和应用程序,同时拥有更高的弹性和可靠性。 云服务器与虚拟主机的区别在于它们的架构和技术上的不同。云服务器使用虚拟化...
    99+
    2023-10-26
    区别 虚拟主机 服务器
  • 云服务器与虚拟主机的区别和联系方式是什么样的
    一、技术 云服务器是一种基于云计算技术的服务器,其主要功能是提供IaaS(基础设施即服务)和PaaS(平台即服务)的服务。它采用了虚拟化技术,将多个物理服务器资源组成一个虚拟服务器池,供用户随意调用、管理和调度。云服务器的运行原理是将服务...
    99+
    2023-10-28
    虚拟主机 区别 联系方式
  • 云服务器与云数据库的区别和联系方式是什么样的
    区别 (1) 物理资源 云服务器是基于云计算技术的服务器,可以为用户提供可扩展的计算资源。云服务器通常需要在多个计算机上并行处理数据,并且可以在任何时间、任何地点访问这些资源。 而云数据库是一种存储数据的方式,它通常由各种数据库组成,...
    99+
    2023-10-27
    区别 联系方式 服务器
  • mysql中limit和offset区别是怎样的
    mysql中limit和offset区别是怎样的,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。上图为t1表中所有数据。比如这个Sql语句从第1...
    99+
    2022-10-18
  • HTML5和以前HTML4的区别分别是怎样的
    本篇文章为大家展示了HTML5和以前HTML4的区别分别是怎样的,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。HTML5是HTML标准的下一个版本。虽然HTML5没...
    99+
    2022-10-19
  • 云服务器和数据库的区别和联系与区别是什么意思
    首先,云服务器是一种虚拟化技术,它可以在不同的物理服务器上创建多个虚拟机。这些虚拟机可以运行不同的应用程序,并在同一台物理服务器上管理。这些应用程序通常不在同一台物理服务器上,但可以在不同的云服务器上运行。 其次,云服务器提供了高可用性和...
    99+
    2023-10-28
    区别 服务器 数据库
  • 负载均衡和集群的区别和联系是什么
    负载均衡和集群都是用于提高系统性能和可用性的技术,但它们的实现方式和目的不同。负载均衡是一种分布式系统架构技术,通过将请求分配到多个...
    99+
    2023-05-31
    负载均衡和集群的区别 负载均衡
  • 集群和负载均衡的区别和联系是什么
    集群和负载均衡都是用于提高系统可用性和性能的技术,但它们的目的和实现方式略有不同。集群是将多个服务器组成一个整体,在这个整体中,每个...
    99+
    2023-06-06
    集群和负载均衡的区别 负载均衡
  • 公有云私有云的联系和区别是什么
    公有云和私有云都是云计算的服务模式,但它们的区别在于:1. 所有权:公有云是由第三方服务商提供的,多个用户共享同一组硬件和基础设施;...
    99+
    2023-06-17
    公有云私有云 公有云 私有云
  • Fedora和红帽Linux的区别是怎样的
    Fedora和红帽Linux的区别是怎样的,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。Fedora 和红帽 Linux。这两个 Linux 发行版都属于同一个组织,都使用 R...
    99+
    2023-06-15
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作