Oracle 學習之RAC(七) 叢集啟動解析

來源:互聯網
上載者:User

標籤:ohasd

  叢集安裝完畢後,重啟電腦,叢集會跟在系統一起啟動。網上很多文章都說是在/etc/inittab中添加一行

h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1

但是在我裝出來的系統中,inittab中並沒有設定任何叢集啟動的資訊。那麼叢集究竟是怎麼啟動的呢?

我們查看一下/etc/rc5.d或者/etc/rc3.d這個目錄下的指令碼。

[[email protected] rc5.d]# ll S96ohasd lrwxrwxrwx 1 root root 17 Aug 13 11:11 S96ohasd -> /etc/init.d/ohasd

就是因為有了這個,叢集才會隨機啟動的。


ohasd是整個叢集的一個高可用服務,監控叢集中的各個進程。當叢集進程崩潰後,嘗試重啟這些進程。

系統啟動時,會調用

crsctl start has -nowait


那麼如何禁止叢集自啟動呢?

[[email protected] ~]# cd /u01/app/11.2.0/grid/bin/[[email protected] bin]# ./crsctl disable crsCRS-4621: Oracle High Availability Services autostart is disabled.
/etc/oracle/scls_scr/11grac1/root/ohasdstr

這個指令碼中的值控制著叢集是否可以自動啟動。


如何手工啟動叢集:

[[email protected] root]# /u01/app/11.2.0/grid/bin/crsctl start crsCRS-4123: Oracle High Availability Services has been started.

此命令先啟動ohasd,然後由ohasd啟動crsd、cssd等後台進程

[[email protected] root]# /u01/app/11.2.0/grid/bin/crsctl check crsCRS-4638: Oracle High Availability Services is onlineCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Services is onlineCRS-4533: Event Manager is online

同時,它也會把資料庫、asm、監聽都一起啟動。


關閉叢集使用命令

[[email protected] root]# /u01/app/11.2.0/grid/bin/crsctl stop crs


如果想把這個叢集中的全部或大部分關閉,可以使用如下命令

[[email protected] root]# /u01/app/11.2.0/grid/bin/crsctl start cluster -all或者[[email protected] root]# /u01/app/11.2.0/grid/bin/crsctl start cluster -n 11grac1 11grac2

但是使用start cluster命令的前提是ohasd已經啟動。


本文出自 “叮咚” 部落格,請務必保留此出處http://lqding.blog.51cto.com/9123978/1684495

Oracle 學習之RAC(七) 叢集啟動解析

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.