1. [grid@RAC01 ~]$ crsctl stop database -d RACwh 數(shù)據(jù)庫(kù)關(guān)閉ok后此時(shí)我們進(jìn)行關(guān)閉crs服務(wù),,切忌不要直接關(guān)閉ASM實(shí)例,,在11g中 11.2.0.2 中 ocr 服務(wù)的信息存放在asm 磁盤上,是依賴于asm的 ,,所以要關(guān)閉crs 而不是直接關(guān)閉asm實(shí)例,,若在此處強(qiáng)行關(guān)閉asm實(shí)例,,很有可能造成的后果是asm磁盤損壞或者丟失,,導(dǎo)致整個(gè)集群徹底崩潰。我在測(cè)試RAC時(shí),,曾dismount某個(gè)磁盤組后,,首先關(guān)閉了數(shù)據(jù)庫(kù),接著直接關(guān)閉了asm實(shí)例,,關(guān)閉時(shí)一切正常,。無(wú)報(bào)錯(cuò),但當(dāng)啟動(dòng)時(shí),,發(fā)現(xiàn)asm無(wú)法啟動(dòng)crs提示CRS-0184: Cannot communicate with the CRS daemon.無(wú)論如何也是無(wú)法啟動(dòng)CRS的,,意識(shí)到可能是表決磁盤或者OCR出現(xiàn)問(wèn)題,隨即查看asm磁盤情況:oracleasm listdisks,,沒(méi)有任何磁盤信息,,oracleasm scandisks也是同樣的情況,這下估計(jì)麻煩了,。在登錄到另外一個(gè)節(jié)點(diǎn)上,,同樣命令查看asm磁盤,發(fā)現(xiàn)磁盤正常,。故此此時(shí)我也將該節(jié)點(diǎn)的數(shù)據(jù)庫(kù)及asm實(shí)例關(guān)閉,,然后重啟服務(wù)器,之后悲劇的一幕想當(dāng)然的發(fā)生了,,兩個(gè)節(jié)點(diǎn)都無(wú)法掃描到asm磁盤信息,。整個(gè)集群破壞的很徹底,丟失數(shù)據(jù),。也許是我個(gè)人原因造成這種異常的數(shù)據(jù)丟失,,但個(gè)人還是建議按照常規(guī)的順序來(lái)關(guān)閉啟動(dòng)RAC。 2. [root@RAC01 bin]# ./crsctl stop crs 如果你足夠細(xì)心,,你可以通過(guò)下面的關(guān)閉日志看出在RAC的CRS關(guān)閉的過(guò)程中是一個(gè)怎樣的順序以及關(guān)閉crs的時(shí)候都會(huì)有那些服務(wù)會(huì)同時(shí)關(guān)閉,。此外你可能還會(huì)發(fā)現(xiàn)我們的這個(gè)命令是在RAC01這個(gè)節(jié)點(diǎn)執(zhí)行的,所以這時(shí)候應(yīng)該RAC02這個(gè)節(jié)點(diǎn)還是可以正常使用的,。強(qiáng)烈建議大家對(duì)下面的日志進(jìn)行研究,。 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac01' CRS-2673: Attempting to stop 'ora.crsd' on 'rac01' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac01' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'rac01' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01' CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'rac01' CRS-2673: Attempting to stop 'ora.OCRVD.dg' on 'rac01' CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac01' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac01' CRS-2673: Attempting to stop 'ora.oc4j' on 'rac01' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'rac01' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac01' CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'rac01' CRS-2677: Stop of 'ora.scan3.vip' on 'rac01' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'rac02' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'rac01' CRS-2677: Stop of 'ora.scan2.vip' on 'rac01' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'rac02' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac01' CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02' CRS-2677: Stop of 'ora.scan1.vip' on 'rac01' succeeded CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac02' CRS-2677: Stop of 'ora.registry.acfs' on 'rac01' succeeded CRS-2677: Stop of 'ora.FLASH.dg' on 'rac01' succeeded CRS-2676: Start of 'ora.scan3.vip' on 'rac02' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'rac02' CRS-2676: Start of 'ora.scan2.vip' on 'rac02' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'rac02' CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded CRS-2676: Start of 'ora.scan1.vip' on 'rac02' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac02' CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'rac02' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'rac02' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded CRS-2677: Stop of 'ora.OCRVD.dg' on 'rac01' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'rac01' CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded CRS-2677: Stop of 'ora.oc4j' on 'rac01' succeeded CRS-2672: Attempting to start 'ora.oc4j' on 'rac02' CRS-2676: Start of 'ora.oc4j' on 'rac02' succeeded CRS-2673: Attempting to stop 'ora.eons' on 'rac01' CRS-2673: Attempting to stop 'ora.ons' on 'rac01' CRS-2677: Stop of 'ora.ons' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'rac01' CRS-2677: Stop of 'ora.net1.network' on 'rac01' succeeded CRS-2677: Stop of 'ora.eons' on 'rac01' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed CRS-2677: Stop of 'ora.crsd' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac01' CRS-2673: Attempting to stop 'ora.ctssd' on 'rac01' CRS-2673: Attempting to stop 'ora.evmd' on 'rac01' CRS-2673: Attempting to stop 'ora.asm' on 'rac01' CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac01' CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac01' CRS-2677: Stop of 'ora.cssdmonitor' on 'rac01' succeeded CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded CRS-2677: Stop of 'ora.ctssd' on 'rac01' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'rac01' succeeded CRS-2677: Stop of 'ora.drivers.acfs' on 'rac01' succeeded CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'rac01' CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac01' CRS-2673: Attempting to stop 'ora.diskmon' on 'rac01' CRS-2677: Stop of 'ora.gpnpd' on 'rac01' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'rac01' CRS-2677: Stop of 'ora.gipcd' on 'rac01' succeeded CRS-2677: Stop of 'ora.diskmon' on 'rac01' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac01' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@RAC01 bin]# 3. 驗(yàn)證關(guān)閉情況: [root@RAC01 bin]# ./crs_stat -t -v CRS-0184: Cannot communicate with the CRS daemon. [root@RAC01 bin]# 4. 啟動(dòng)crs服務(wù): [root@RAC01 bin]# ./crsctl start crs-------------此處可能需要等待一段時(shí)間。 CRS-4123: Oracle High Availability Services has been started. [root@RAC01 bin]# 5. 查看啟動(dòng)情況: [grid@RAC02 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac02 ora.FLASH.dg ora....up.type 0/5 0/ ONLINE ONLINE rac02 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac01 ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac01 ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02 ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02 ora....N4.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02 ora.OCRVD.dg ora....up.type 0/5 0/ ONLINE ONLINE rac01 ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac01 ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE rac01 ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac01 ora.oc4j ora.oc4j.type 0/5 0/0 ONLINE ONLINE rac02 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac01 ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac01 ora....01.lsnr application 0/5 0/0 ONLINE ONLINE rac01 ora.rac01.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac01.ons application 0/3 0/0 ONLINE ONLINE rac01 ora.rac01.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac01 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac02 ora....02.lsnr application 0/5 0/0 ONLINE ONLINE rac02 ora.rac02.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac02.ons application 0/3 0/0 ONLINE ONLINE rac02 ora.rac02.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac02 ora.racwh.db ora....se.type 0/2 0/1 OFFLINE OFFLINE ora....f01.svc ora....ce.type 0/0 1/0 OFFLINE OFFLINE-----------我個(gè)人添加的STAF服務(wù),。 ora....f02.svc ora....ce.type 0/0 0/0 OFFLINE OFFLINE-----------我個(gè)人添加的STAF服務(wù),。 ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac01 ora.scan1.vip ora....ip.type 0/0 1/0 ONLINE ONLINE rac01 ora.scan2.vip ora....ip.type 0/0 1/0 ONLINE ONLINE rac02 ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac02 ora.scan4.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac02 [grid@RAC02 ~]$ 6. 啟動(dòng)數(shù)據(jù)庫(kù): [grid@RAC02 ~]$ srvctl start database -d RACwh PRCR-1079 : Failed to start resource ora.racwh.db ORA-16038: log 3 sequence# 41 cannot be archived ORA-19504: failed to create file "" ORA-00312: online log 3 thread 2: '+DATA/racwh/redo03.log'
CRS-2674: Start of 'ora.racwh.db' on 'rac01' failed CRS-2632: There are no more servers to try to place resource 'ora.racwh.db' on that would satisfy its placement policy [grid@RAC02 ~]$ 針對(duì)上述的報(bào)錯(cuò),經(jīng)查看原來(lái)是歸檔日志所在的asm未能mount所致,,執(zhí)行該磁盤的mount后重新執(zhí)行數(shù)據(jù)庫(kù)啟動(dòng)即可,。 此外給大家推薦幾個(gè)日常的啟動(dòng)關(guān)閉命令: 其他管理維護(hù)指南 一.通過(guò)srvctl管理 1.關(guān)閉RAC數(shù)據(jù)庫(kù)服務(wù)順序 [oracle@dbp ~] $ srvctl stop database -d RACwh [oracle@dbp ~] $ srvctl stop asm -n RAC01 [oracle@dbp ~] $ srvctl stop asm -n RAC02 [oracle@dbp ~] $ srvctl stop nodeapps -n RAC01 [oracle@dbp ~] $ srvctl stop nodeapps -n RAC02 2.啟動(dòng)RAC數(shù)據(jù)庫(kù)服務(wù)順序 [oracle@RAC01 ~] $ srvctl start nodeapps -n RAC01 [oracle@RAC01 ~] $ srvctl start nodeapps -n RAC02 [oracle@RAC01 ~] $ srvctl start asm -n RAC01 [oracle@RAC01 ~] $ srvctl start asm -n RAC02 [oracle@RAC01 ~] $ srvctl start database -d RACwh 3.其他命令 實(shí)例管理 [oracle@RAC01 ~] $ srvctl status instance -d RACwh -i RACwh1 [oracle@RAC01 ~] $ srvctl stop instance -d RACwh -i RACwh1 [oracle@RAC01 ~] $ srvctl start instance -d RACwh -i RACwh1 監(jiān)聽(tīng)管理 [oracle@RAC01 ~] $ srvctl status listener -n RAC01 [oracle@RAC01 ~] $ srvctl stop listener -n RAC01 [oracle@RAC01 ~] $ srvctl start listener -n RAC01 二.通過(guò)crsctl工具管理 [oracle@RAC01 ~] $ crs_stat -t [oracle@RAC01 ~] $ crs_stat [oracle@RAC01 ~] $ crs_start -all [oracle@RAC01 ~] $ crs_stop -all [oracle@RAC01 ~] $ crs_stop "ora. RACwh.db" Crs_stat命令在oracle11g后逐漸趨于廢棄,如下即可明白: [grid@RAC02 ~]$ crs_stat -h This command is deprecated and has been replaced by 'crsctl status resource' This command remains for backward compatibility only
Usage: crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_member] crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_member] crs_stat -p [resource_name [...]] [-q] crs_stat [-a] application -g crs_stat [-a] application -r [-c cluster_member] crs_stat -f [resource_name [...]] [-q] [-c cluster_member] crs_stat -ls [resource_name [...]] [-q]
|
|
來(lái)自: 盼盼天下 > 《我的圖書(shū)館》