oracle 11g rac 程式理解

imlihj2007發表於2013-03-20

啟動後的狀況:
rac1-> su - grid
Password:
rac1-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE rac1 【磁碟組】
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.devdb.db ora....se.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE 【不知道什麼意思】
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2 預設是沒有啟動的
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
啟動gsd服務
#檢視節點linux1上所有的資源狀態,可以看到輸出的資訊表明GSD也被disable了
37. [grid@linux2 ~]$ srvctl status nodeapps -n linux1
38. -n option has been deprecated.
39. VIP linux1-vip is enabled
40. VIP linux1-vip is running on node: linux1
41. Network is enabled
42. Network is running on node: linux1
43. GSD is disabled
44. GSD is not running on node: linux1
45. ONS is enabled
46. ONS daemon is running on node: linux1
47. eONS is enabled
48. eONS daemon is running on node: linux1
49.
50. #下面檢視節點linux2上所有的資源狀態,也可以看到輸出的資訊表明GSD也被disable了
51. [grid@linux2 ~]$ srvctl status nodeapps -n linux2
52. -n option has been deprecated.
53. VIP linux2-vip is enabled
54. VIP linux2-vip is running on node: linux2
55. Network is enabled
56. Network is running on node: linux2
57. GSD is disabled
58. GSD is not running on node: linux2
59. ONS is enabled
60. ONS daemon is running on node: linux2
61. eONS is enabled
62. eONS daemon is running on node: linux2
63.
64. #將所有的服務置於enable狀態
65. [grid@linux2 ~]$ srvctl enable nodeapps
66. PRKO-2415 : VIP is already enabled on node(s): linux1,linux2
67. PRKO-2416 : Network resource is already enabled.
68. PRKO-2417 : ONS is already enabled on node(s): linux1,linux2
69. PRKO-2418 : eONS is already enabled on node(s): linux1,linux2
70.
71. #再次檢視GSD的狀態已經變成enable了
72. [grid@linux2 ~]$ srvctl status nodeapps
73. VIP linux1-vip is enabled
74. VIP linux1-vip is running on node: linux1
75. VIP linux2-vip is enabled
76. VIP linux2-vip is running on node: linux2
77. Network is enabled
78. Network is running on node: linux1
79. Network is running on node: linux2
80. GSD is enabled
81. GSD is not running on node: linux1
82. GSD is not running on node: linux2
83. ONS is enabled
84. ONS daemon is running on node: linux1
85. ONS daemon is running on node: linux2
86. eONS is enabled
87. eONS daemon is running on node: linux1
88. eONS daemon is running on node: linux2
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
*****************************************************剛剛啟動叢集的時候Ocr 檔案損壞
1 檢視日誌/u01/app/11.2.0/grid/log/rac1/alertrac1.log
2013-03-20 22:48:15.800
[client(7819)]CRS-1013:The OCR location in an ASM disk group is inaccessible. Details in /u01/app/11.2.0/grid/cdata/rac-cluster/backup_20130320_024738.ocr.
恢復辦法:
2 兩個節點都停止crs
crsctl stop crs -f[有錯的時候 停止不完全 可以加引數-f]
3 一個節點獨佔模式啟動
crsctl start crs -excl
4 停止資源
crsctl stop resource ora.crsd -init
ocrconfig -showbackup
ocrconfgi -restore 'file'
5 關閉重啟
crsctl stop crs -f
crsctl start crs
*****************************************************
狀態啟動後檢查
rac1-> crsctl check cluster 狀態檢查
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
rac1-> srvctl status database -d devdb
Instance devdb1 is running on node rac1
Instance devdb2 is running on node rac2

rac1-> srvctl status instance -d devdb -i devdb1
Instance devdb1 is running on node rac1
rac1-> srvctl status instance -d devdb -i devdb2
Instance devdb2 is running on node rac2
rac1-> srvctl status nodeapps
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
Network is enabled
Network is running on node: rac1
Network is running on node: rac2
GSD is enabled
GSD is running on node: rac1
GSD is running on node: rac2
ONS is enabled
ONS daemon is running on node: rac1
ONS daemon is running on node: rac2
eONS is enabled
eONS daemon is running on node: rac1
eONS daemon is running on node: rac2
rac1-> srvctl config database -d devdb -a
Database unique name: devdb
Database name: devdb
Oracle home: /u01/app/oracle/product/11.2.0/db_1/db
Oracle user: oracle
Spfile: +DATA/devdb/spfiledevdb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: devdb
Database instances: devdb1,devdb2
Disk Groups: DATA
Services:
Database is enabled
Database is administrator managed
rac1-> srvctl status asm
ASM is running on rac1,rac2
rac1-> srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac1,rac2
rac1-> srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
rac1-> cluvfy comp clocksync -verbose
【...】
rac1-> crs_stat -t【有的資糧上說 11g不建議用這個命令 不過太順手了】
rac1-> srvctl stop nodeapps -n rac1
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.rac2.vip' on 'rac2'
CRS-2673: Attempting to stop 'ora.gsd' on 'rac2'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac2'
CRS-2677: Stop of 'ora.rac2.vip' on 'rac2' succeeded
CRS-2677: Stop of 'ora.gsd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stop of 'ora.scan1.vip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'rac2'
CRS-2673: Attempting to stop 'ora.ons' on 'rac2'
CRS-2675: Stop of 'ora.ons' on 'rac2' failed
CRS-2679: Attempting to clean 'ora.ons' on 'rac2'
CRS-2681: Clean of 'ora.ons' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac2'
CRS-2677: Stop of 'ora.net1.network' on 'rac2' succeeded
CRS-2677: Stop of 'ora.eons' on 'rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2' has completed
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac1'
CRS-2677: Stop of 'ora.net1.network' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.crsd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2'
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac2'
CRS-2677: Stop of 'ora.diskmon' on 'rac2' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'rac1' succeeded

[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -all
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac2'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac2'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac2'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac2' succeeded
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac2'
CRS-2676: Start of 'ora.ctssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac2'
CRS-2672: Attempting to start 'ora.evmd' on 'rac2'
CRS-2676: Start of 'ora.evmd' on 'rac2' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'rac1'
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.evmd' on 'rac1' succeeded
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded
CRS-4404: The following nodes did not reply within the allotted time:


後臺程式 說明
Oracle高可用服務 (OHAS) OHAS是伺服器啟動後開啟的第一個Grid Infrastructure元件。它被配置為以init(1)開啟,並負責生成agent程式。
Oracle Agent Grid Infrastructure使用兩個oracle代理程式。第一個,概括起來說,負責開啟一些需要訪問OCR和VOTING檔案的資源。它由OHAS建立。
第二個代理程式由CRSD建立,負責開啟所有不需要root許可權來訪問的資源。這個程式以Grid Infrastructure所屬使用者的許可權執行,並且負責在RAC11.1中racg所做的工作。
Oracle Root Agent 和 Oracle 代理程式類似,有兩個Root 代理程式被建立。 最初的代理程式由OHAS引發,它為linux系統中需要更高許可權的資源提供初始化。建立的主要後臺程式是CSSD和CRSD。反過來,CRSD將觸發另一個root代理。這個代理將開啟需要root許可權、主要和網路相關的資源
叢集就緒服務程式
(CRSD) 叢集軟體的後臺主要程式,使用oracle叢集註冊資訊來管理叢集中的資源
叢集同步服務程式
(CSSD) 管理叢集的配置和節點成員
Oracle程式監控
(OPROCD) oprocd在11.1版本中負責 I/O 隔離。它是在10.2.0.4補丁集中為linux系統引入的。在這個補丁集以前,核心hangcheck-timer 模組來做類似的任務。有趣的是,oprocd以前常被用在非linux平臺中。Grid Infrastructure用cssdagent程式來替換了oprocd程式。
事件管理器(EVM) EVM負責釋出Grid Infrastructure建立的事件
叢集時間同步服務(CTSS) CTSS服務是一個可選項,透過網路時間協定伺服器為叢集提供時間同步,這個時間同步對RAC很重要。它可以執行在兩種模式下:觀望或者活動。當NTP被啟用的時候,它執行在觀察模式,若沒有啟動NTP,它將根據主節點同步所有節點的時間。
Oracle警告服務(ONS) 負責透過快

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9879835/viewspace-1060318/,如需轉載,請註明出處,否則將追究法律責任。

相關文章