這篇文章將為大家詳細(xì)講解有關(guān)has、ohasd、crs、cluster區(qū)別和聯(lián)系是怎樣的,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。
創(chuàng)新互聯(lián)建站專注于江城網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供江城營銷型網(wǎng)站建設(shè),江城網(wǎng)站制作、江城網(wǎng)頁設(shè)計(jì)、江城網(wǎng)站官網(wǎng)定制、重慶小程序開發(fā)服務(wù),打造江城網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供江城網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
has是高可用服務(wù),用在restart環(huán)境,可以是單機(jī)環(huán)境也可以是RAC環(huán)境,不管單機(jī)環(huán)境還是RAC環(huán)境,都可以執(zhí)行crsctl check has,在RAC環(huán)境下,可以簡(jiǎn)單理解成cluster的一部分
ohasd是has后臺(tái)進(jìn)程的概念
crs是集群就緒服務(wù),用在RAC環(huán)境,單機(jī)環(huán)境不能執(zhí)行crsctl check crs,crsctl start CRS不單單啟動(dòng)CRSD了,等于啟動(dòng)OHASD、CRSD、CSSD三者了
cluster就是集群的意思,用在RAC環(huán)境,單機(jī)環(huán)境不能執(zhí)行crsctl check cluster
單機(jī)環(huán)境無法執(zhí)行crsctl check crs、crsctl check cluster,但是可以執(zhí)行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高可用性服務(wù)來自動(dòng)啟動(dòng)和停止由Oracle Restart管理的組件。 例如,Oracle高可用性服務(wù)守護(hù)進(jìn)程自動(dòng)啟動(dòng)數(shù)據(jù)庫,偵聽器和Oracle ASM實(shí)例。 當(dāng)Oracle高可用性服務(wù)被禁用時(shí),重啟節(jié)點(diǎn)時(shí)將不啟動(dòng)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堆棧的較低部分,該堆棧由促進(jìn)群集操作的進(jìn)程組成。
Oracle Restart 能提高數(shù)據(jù)庫的可用性,當(dāng)安裝了Oracle Restart 之后,在系統(tǒng)出現(xiàn)硬件或者軟件問題,或者主機(jī)重啟之后,OracleRestart管理的組件都能自動(dòng)的進(jìn)行啟動(dòng)。
OHASD是一個(gè)后臺(tái)的守護(hù)進(jìn)程,其可用來啟動(dòng)和監(jiān)控OracleRestart進(jìn)程。該進(jìn)程由/etc/init.d/ohasd 腳本來初始化,并由root用戶來執(zhí)行ohasd.bin來啟動(dòng),如下
[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,立馬又會(huì)被拉起了(參考/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)已經(jīng)棄用了inittab,相反,init.ohasd將通過/etc/init/oracle-ohasd.conf中的upstart配置,但是,進(jìn)程“/etc/init.d/init.ohasd run“仍然應(yīng)該啟動(dòng),Oracle Linux 7(和Red Hat Linux 7)使用systemd來管理啟動(dòng)/停止服務(wù)(例如:/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
對(duì)于standalone server,使用OHASD來管理Oracle Restart,并且不需要CRSD進(jìn)程的支持??梢允褂肙HASD管理的組件如下:
1.CSSD: This is used for Group Services as it was inprevious releases (when it was installed using “l(fā)ocalconfig 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.
執(zhí)行高可用性恢復(fù)和管理操作(如維護(hù)OCR)的主要Oracle Clusterware進(jìn)程。 還管理應(yīng)用程序資源并以root用戶(或基于Mac OS X的系統(tǒng)上的管理員組中的用戶)身份運(yùn)行,并在失敗時(shí)自動(dòng)重新啟動(dòng)。
[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集群件使服務(wù)器能夠相互通信,以使它們看起來像是一個(gè)集體單元。 這種服務(wù)器組合通常被稱為集群。 雖然服務(wù)器是獨(dú)立的服務(wù)器,但每臺(tái)服務(wù)器都有其他的進(jìn)程與其他服務(wù)器通信。 通過這種方式,獨(dú)立服務(wù)器看起來好像是應(yīng)用程序和最終用戶的一個(gè)系統(tǒng)。
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的一臺(tái)節(jié)點(diǎn)執(zhí)行的結(jié)果
[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不單單啟動(dòng)CRSD了,等于啟動(dòng)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的一臺(tái)節(jié)點(diǎn)執(zhí)行的結(jié)果
[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.
單機(jī)執(zhí)行的結(jié)果
[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.
關(guān)于has、ohasd、crs、cluster區(qū)別和聯(lián)系是怎樣的就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。