RAC學習

it_newbalance發表於2013-01-31

crsctl query crs activeversion 檢視版本ITPUB個人空間1obx$\:?2o+js
ocrconfig -showbackup auto 檢視自動備份的目錄
0F6j0f? g{*AH&ro24558279ocrconfig -export /home/oracle/ocr.backup 邏輯ocr備份
?)lB ]1S{24558279ocrconfig –import /shared/export/ocrback.dmp 邏輯恢復ITPUB個人空間A8z4n5@c#~
/oracle/app/grid/product/11.2.0/bin/ocrconfig -manualbackup root許可權進行備份ocr
RY9}3U9X3C%G24558279恢復 ocrconfig -restore backup00.ocr 物理恢復
;urE-R"j"j^/m5ny7`24558279ocrconfig -showbackup manual檢視手動備份的位置
K@ ay| p8g!l u$j24558279cluvfy comp ocr -n all 可以檢查OCR的可用性同時包含OCR配置的檔案/etc/oracle/ocr.loc
!f RM%vWa)Uj(B1WC24558279ocrcheck -local 檢視olr root許可權ITPUB個人空間#gP(iTcGbcMu,[
oifcfg getif 檢視配置的介面ITPUB個人空間|UNZ1O:o1k$Psr6\
srvctl config nodeapps -a 檢視虛擬IP資訊
QHjm vQ^*}.`24558279cluvfy comp nodecon -n all -verbose 檢查節點的連通性
o-j#O%R9o0Hn]8H24558279crsctl status serverpool -f 檢視server pool屬性
7la G2bH$q9rW;H%k24558279crsctl status server -f 檢視當前節點有效的server pool
)a5W$C+T}!?p24558279srvctl modify srvpool -g SP2 –l 4 –u 8 –i 7

節點2 crsctl disable crsITPUB個人空間6{7l[jT/A6e
重啟ITPUB個人空間.m'a*?9}_r
使用ps -ef | grep d.bin
KC"HUqn.djQ24558279確定CRS服務沒啟動

crsctl disable has
Av oVn n6_9h#[24558279crsctl check has


}(k$p&hQ%Q4`24558279一、改變VIP
1J*y+p-V Hyt(l5fo245582791、STOP SERVICEITPUB個人空間'lj!jB d X
srvctl stop service -d grid -s sales,oltp -n mynode
`5Tus.eR+fR LF245582792、檢視VIP設定
!d.`zK2po24558279[grid@rac1 ~]$ srvctl config vip -n rac1
ynvK_@3a24558279VIP exists: /rac1vip/172.16.14.56/172.16.14.0/255.255.255.0/eth0, hosting node rac1
lqy W3lw_p/c245582793、停止VIP,並且需要關閉LISTENER(因為虛擬IP註冊到了LISTENER)ITPUB個人空間:qs l pB3[
srvctl stop vip -n rac2 -fITPUB個人空間w5M"x f\
4、確定VIP已經關閉ITPUB個人空間/q^xsvF
ifconfig -a 發現已經沒有相關虛擬IP的地址ITPUB個人空間d^1l$a1n0\!R;B @
5、修改其在HOSTS中的配置
4DI]6@ pZb[&T n.Xc kE245582796、
~/U*VRDrop24558279srvctl modify network -S subnet/netmask/interface
&pKAi}]5GK245582797、使用新的VIP roo許可權
q["gZ"XN%@"b5X24558279srvctl modify nodeapps -n node_name -A new_vip_address
TG g a0~3GCU24558279srvctl modify nodeapps -n mynode -A 192.168.2.125/255.255.255.0/eth0ITPUB個人空間0| m0O(c0npE^v
8、啟動VIP
\'WMrb24558279srvctl start vip -n mynodeITPUB個人空間9Mk3|#o kNE7l|Y%j
9、ITPUB個人空間 q7bh _ r"r{~N(U
在所有節點完成 這個步驟ITPUB個人空間 kZR6C,t[
10、測試聯通性
aiX fXp2{m24558279cluvfy comp nodecon -n all -verbose

二、改變私有網路介面
3[Y3agB9gW _1M245582791、olsnodes -s 確定哪些節點是有效的。ITPUB個人空間sg,I*h| [ha E:lnV
[grid@rac2 ~]$ olsnodes -s
T0q(mB%Yuy24558279rac1 ActiveITPUB個人空間;J5C5aaf/Bc4m
rac2 ActiveITPUB個人空間:ua~r d Ip~n5V
2、oifcfg getif 檢視IP配置資訊
acC0lQ1^245582793、確定網路卡配置資訊生效ifconfig
%O#qh Z D"] ~,t:G;t7{@0j245582794、配置新的網路卡資訊修改OCR裡面的資訊ITPUB個人空間5M+lF sy*L3Y(c%i
oifcfg setif -global "eth*/192.168.0.0:cluster_interconnect
6TFD:g#x h245582795、刪除原有的私有網口ITPUB個人空間Ryf]#H
oifcfg delif -global eth1/10.10.0.0ITPUB個人空間8K]+EZD9h$|d
6、確定新的私有網口已經生效ITPUB個人空間B0M#Fwc |2l%Kw
oifcfg getifITPUB個人空間 ma8E e!f#U1N \'K ^
7、關閉整個crs堆疊
7Yx `@-["|24558279crsctl stop crs
;A\ PDNL S245582798、down掉已經刪除的網路結構
3j9y{z y*MeOL:|24558279ifconfig down
eG'L3pY&YO T245582799、重新啟動crs
pP%oWiJ24558279crsctl start crsITPUB個人空間4p x^z6lJ!a sa
三、線上移動ocr(可以使NFS ASM RAW)ITPUB個人空間X Vq(W2b%z Jaj7wG(l
/oracle/app/grid/product/11.2.0/bin/ocrconfig -add +cssITPUB個人空間j b2J`#W Ey
/oracle/app/grid/product/11.2.0/bin/ocrconfig -delete +css2

Note: The operations in this section affect OCR clusterwide: theyITPUB個人空間 o F7?r.De
change the OCR configuration information in the ocr.loc file on
iP]&Jl$jF-k;h24558279Linux and UNIX systems and the Registry keys on Windows systems.ITPUB個人空間Zx|/d}a-|.N
However, the ocrconfig command cannot modify OCR
&qO&@k*[](k4B:@24558279configuration information for nodes that are shut down or for nodes
!do*H1q }&gf24558279on which Oracle Clusterware is not running.

四、移動votedisk(離線,當votedisk 在ASM上的時候)
(W9Zo y8y n-Q24558279/oracle/app/grid/product/11.2.0/bin/crsctl stop cluster -allITPUB個人空間 }Kj0{me'l.E
各個節點執行ITPUB個人空間&@B]*],[x&~B
/oracle/app/grid/product/11.2.0/bin/crsctl stop crs -f
w kOJ?,p i j I24558279在一個節點執行
&O z1MoN2{'s24558279 /oracle/app/grid/product/11.2.0/bin/crsctl start crs -excl -nocrsITPUB個人空間%L!PuC8bI(R"P@};b/P
然後在此節點執行
a"Ed9aJA| q;J1a24558279[root@rac2 ~]# /oracle/app/grid/product/11.2.0/bin/crsctl replace votedisk +cssITPUB個人空間7w af0W:s
Successful addition of voting disk 17ade0f84fed4f89bfbee52bb621586c.
-lm_'hU8]9|JO3D@24558279Successful deletion of voting disk 358983bb663b4f6cbf54882b372f30ff.
_2|T$M9C s%FN24558279Successfully replaced voting disk group with +css.ITPUB個人空間)j1B+])Ce0{eH
CRS-4266: Voting file(s) successfully replacedITPUB個人空間p_S#oei
最後關閉ITPUB個人空間z&p0i*sv J8r
/oracle/app/grid/product/11.2.0/bin/crsctl stop crs -fITPUB個人空間F)S8] Q V#g+f#n~.F
(也可以從ASM移動到裸裝置ITPUB個人空間0I;x-Qly|F+i
[root@rac2 ~]# /oracle/app/grid/product/11.2.0/bin/crsctl replace votedisk /dev/raw/raw1ITPUB個人空間3e{&k;Z:m3d
Now formatting voting disk: /dev/raw/raw1.
8v*o L-Gq p,X24558279CRS-4256: Updating the profile
(H+}*f*x9b#X:`24558279Successful addition of voting disk 1114f903fd5b4f4abfe732fdde5df413.
"d Bah!{ k Tx?24558279Successful deletion of voting disk 17ade0f84fed4f89bfbee52bb621586c.ITPUB個人空間4E~t3{,fn:I/T
CRS-4256: Updating the profile
f0x"p/A$[ z/B8H24558279CRS-4266: Voting file(s) successfully replaced
8Y`f%nUg!J24558279
5}e/z#lMl24558279重新啟動即可
7B(r"q&pl m24558279五、線上移動votedisk,當VOTEDISK在NFS或者RAW上的時候
/_9x WX"Bl'|24558279[root@rac2 ~]# /oracle/app/grid/product/11.2.0/bin/crsctl add css votedisk /dev/raw/raw5
cY4Js @}v/w24558279Now formatting voting disk: /dev/raw/raw5.
5B"h#S+MOw24558279CRS-4603: Successful addition of voting disk /dev/raw/raw5.
? uq$gnJ24558279[root@rac2 ~]# /oracle/app/grid/product/11.2.0/bin/crsctl delete css votedisk /dev/raw/raw1
{ S k-x'n$W"eo24558279CRS-4611: Successful deletion of voting disk /dev/raw/raw1.


2lj$R:r"{24558279六、lcr在哪裡ITPUB個人空間C&Y,g2seV{
Grid_home/cdata/host_name.olrITPUB個人空間c5@E3J}0n
由oahs使用這些資訊ITPUB個人空間4O|e6RD/A d"R7D;F(p BP:^
/oracle/app/grid/product/11.2.0/bin/ocrcheck -local 檢視位置
^2VXH l;JB{24558279ocrconfig -local -showbackup 檢視lcr備份

七、備份和恢復OCRITPUB個人空間;it(@gG!`#|
ocrconfig -showbackup 檢視自動備份位置ITPUB個人空間PxP,i*dC8Dk
ocrconfig -manualbackup 檢視手動備份記錄ITPUB個人空間'IGG#B7` V8L
ocrconfig -manualbackup auto/manual 也可以檢視手動和自動備份ITPUB個人空間1PI)fN4B+e8A G:j ~
/oracle/app/grid/product/11.2.0/bin/ocrdump -backupfile /oracle/app/grid/product/11.2.0/cdata/rac-cluster/backup00.ocr
i1]SL5qT#I24558279能把備份的OCR檔案DUMP出來。檢視其中的資訊。ITPUB個人空間`g U)_fM
預設的備份位置就在cdata/cluster_name下面 ocrconfig -backuploc 可以修改備份的位置,沒什麼必要ITPUB個人空間j`? F2d
1、檢視節點
(W.T{.Mw0GC24558279[grid@rac1 ~]$ olsnodesITPUB個人空間%`w djV7J-r8I |
rac1
#o!k(a8x({c8f'q24558279rac2
!F\W ^K245582792、關閉CRS及OAHS堆載
P C"n)J\(t S?n24558279/oracle/app/grid/product/11.2.0/bin/crsctl stop cluster -all
oZ6f^4ru)F24558279然後分別在各個節點關閉ITPUB個人空間x8i+_/ZS4P/?'{
crsctl stop crs -f
E4b(s$q7O8O/x24558279(如果是使用的NFS 或者RAW 或者叢集檔案系統ITPUB個人空間.nsngV_9t}
此時ocrconfig -restore 即可)
}TO r|24558279一個啟動到獨佔並且不是叢集狀態下
G!e3SO4x/O9dY24558279crsctl start crs -excl -nocrs
O;v1MC%}24558279檢查一下CRSD是否啟動如果啟動使用
)gq i+{L*K$s$vL24558279crsctl stop resource ora.crsd -init 關閉
#z:o0x'b5l24558279通過 select GROUP_NUMBER ,PATH from v$asm_disk; 來判斷ASM磁碟ITPUB個人空間5fv TS N9|D{X-{
然後通過ITPUB個人空間6g#H'J0Q i'C
[grid@rac1 ~]$ /etc/init.d/oracleasm querydisk -d DATA6ITPUB個人空間^`&}3{oa-k7E
Disk "DATA6" is a valid ASM disk on device /dev/sdc1[8,33]
nzJ'c+@24558279來確定使用的那個LV或者LUN,或者NFS盤
-F4f m(N.yFj:|24558279在ASM中刪除CRSD的磁碟組ITPUB個人空間lyoh8\e
drop diskgroup CSS force including contents; (注意使用SYSASM許可權)
s:z7~9M+Si/\z't24558279建立ASM DISKGROUP
$~l4N~1i}24558279create diskgroup CSS external redundancy disk 'ORCL:DATA6' attribute 'COMPATIBLE.ASM' = '11.2';
O2k~4T`+hf8g24558279SQL> create diskgroup CSS external redundancy disk 'ORCL:DATA6' attribute 'COMPATIBLE.ASM' = '11.2';

Diskgroup created.
:{d/x0g7t7CT24558279最後ITPUB個人空間Mx.O*?u:Nqx
/oracle/app/grid/product/11.2.0/bin/ocrconfig -restore /oracle/app/grid/product/11.2.0/cdata/rac-cluster/backup00.ocr
6]7C"n8^"^jM/I24558279ocrcheck
1N3ilp R,B24558279------------
`oIZ$xFN6s7G24558279同時可以使用
`:L"N u3i"[;|l24558279ocrconfig -export file_nameITPUB個人空間@NhS{
ocrconfig -import file_name
Hi HO R D X24558279進行備份恢復,但是又這樣一句話
\ hJ3GF2?N24558279Backups are created when the system is online. You must shut down OracleITPUB個人空間CWOD'c Z+uo
Clusterware on all nodes in the cluster to get a consistent snapshot using the
3u _)P(o.a:Ti24558279ocrconfig -export command.
kI-W/?Ly J]24558279-----------------
7mw]NUp Y%x8E24558279/oracle/app/grid/product/11.2.0/bin/ocrdump -backupfile backup00.ocr 可以生成一個名字為OCRDUMPFILE的檔案方便檢視OCR資訊ITPUB個人空間](lX3?6SO$u3s
八、恢復VOTE disk
/g)S2P8c%b5g%c2455827911gR2中不需要對VOTE disk進行單獨的備份,任何DD備份也是無效的。ITPUB個人空間2C ~Y:I$@_$n
crsctl start crs -excl 啟動到獨佔模式(可能同時需要先恢復OCR,在OCR損壞的情況下)
Wt j%d ~)|,V [*p24558279crsctl replace votedisk +asm_disk_group(用於ASM下的VOTE)
f$Qd(n\24558279$ crsctl delete css votedisk FUID
NZgpG)l3[s'R24558279$ crsctl add css votedisk path_to_voting_disk(用於非ASM下的VOTE)
,U%B Ws$N"?24558279我這裡是使用的RAW下的所以ITPUB個人空間 g'[0J-xiO
[root@rac1 oracle]# /oracle/app/grid/product/11.2.0/bin/crsctl add css votedisk /dev/raw/raw1
]e'k cL/Q"i1p#P24558279Now formatting voting disk: /dev/raw/raw1.ITPUB個人空間Vdu;G"A*p.q
clsscfgVFFormatted: corrupt volume info block(3)ITPUB個人空間:b'Y @p,eZ b{]6X
CRS-4603: Successful addition of voting disk /dev/raw/raw1.ITPUB個人空間;`M0we6]3l.@2z'u+w Q
就可以了,重啟即可
z~KP.@{ ro8[w24558279九、手動備份OCR/LCR,及恢復lcr
&[[,\p+i24558279ocrconfig [-local] -manualbackupITPUB個人空間F'XY8b _"n6L
恢復:ITPUB個人空間-b7s'[n~"}C$m
# crsctl stop crs
q5^5ov0p8C24558279# ocrconfig -local -restore file_nameITPUB個人空間7nN(~8\/{A
# ocrcheck -local
t/G4P;kh"}I l24558279# crsctl start crs
1}^X,Bu p@24558279$ cluvfy comp olrITPUB個人空間ew0JBg2x
十、例項修改PUBLIC IP 和VIP

注意最好先備份OCR和VOTEDISK

公有IP rac3 172.16.14.63ITPUB個人空間2JX^|a2J$r0W8tb
私有IP rac3prv 10.10.10.5
!bl"y(I k(V24558279虛擬IP rac3vip 172.16.14.64ITPUB個人空間 N8Qe2?.j:d4li m!A
scan ip racscan 172.16.14.58

修改為ITPUB個人空間Y ND'd6c xhf.D
公有IP rac3 172.16.1.95
NU(p2Go v)qk24558279私有IP rac3prv 10.10.10.5
(ZJyP6l24558279虛擬IP rac3vip 172.16.1.96ITPUB個人空間? GXo"W2D4I(E5F1_j9o
scan ip racscan 172.16.14.58


f-w7t@ _T24558279 How to Modify Public Network Information including VIP in Oracle Clusterware [ID 276434.1]
'Ly%hH fw?245582791、在CRS 啟動階段執行
"B/uY5H$H(S24558279/oracle/app/grid/product/11.2.0/bin/oifcfg delif -global eth0/172.16.14.0ITPUB個人空間Y3zD7v7e+Wi
/oracle/app/grid/product/11.2.0/bin/oifcfg setif -global eth0/172.16.1.0ITPUB個人空間W#[-ob9j2G
[root@rac3 ~]# /oracle/app/grid/product/11.2.0/bin/oifcfg getif
-S)DC(s'~u E24558279eth1 10.0.0.0 global cluster_interconnectITPUB個人空間.|4{Noc3}WC/D
eth0 172.16.1.0 global publicITPUB個人空間gv X7KX;?_
2、修改OS ip
:vcM ?Xt F]a245582793、修改HOSTS 檔案
n5r2sM6^24558279172.16.14.29 rac1ITPUB個人空間p2~vA+N*K-_;y#]\.P
172.16.14.55 rac2ITPUB個人空間|)`URiM;T}B%C#W
172.16.1.95 rac3 ---修改ITPUB個人空間IM&o4^#h:S"O*T
10.10.10.1 rac1prvITPUB個人空間2\]9Z.R Q!o
10.10.10.2 rac2prv
)we Jk,o1i+D2455827910.10.10.5 rac3prv
Y,H@}G1I/m;`*E24558279172.16.14.56 rac1vipITPUB個人空間$f/[\J/LP!\t
172.16.14.57 rac2vipITPUB個人空間7dQ8Gs(F$Jp:z
172.16.1.96 rac3vip ---修改ITPUB個人空間;}o*WS$V`"iR
172.16.14.58 racscan
0q3~*y OA1z#Kb%~vrx245582794、重啟CLUSTER
.u.aG$@-[2`\,eLj)l5`D24558279啟動過後發現RAC3 VIP已經漂移到了RAC2
"[7v'x`]J245582795、檢視VIP 資訊
%a%`2q Q-[24558279[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/srvctl config nodeapps -aITPUB個人空間wbAa G)l4z
Network exists: 1/172.16.14.0/255.255.255.0/eth0, type staticITPUB個人空間$l2Lh)V&J&F Ph
VIP exists: /rac1vip/172.16.14.56/172.16.14.0/255.255.255.0/eth0, hosting node rac1
?DawE/g#m9_c3V24558279VIP exists: /rac2vip/172.16.14.57/172.16.14.0/255.255.255.0/eth0, hosting node rac2ITPUB個人空間F\4C? @*\,{$}
VIP exists: /rac3vip/172.16.1.96/172.16.14.0/255.255.255.0/eth0, hosting node rac3

並且資源狀態如下:ITPUB個人空間.B:LIJGy
[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/crs_stat -t
Gm.`MIP%qf\24558279Name Type Target State Host
D/u1[(Ys8K24558279------------------------------------------------------------
A$uRuu g t(z-K24558279ora.CSS.dg ora....up.type ONLINE OFFLINE
"\:jN eLYB*jc24558279ora.CSS2.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間-BDkW-{YXqc'r$o*c
ora.DATA1.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間r0_\ea*i&eNq n'}of
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
&X:NyN'v+m;c7y24558279ora....N1.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間D;hqVd]\O
ora.asm ora.asm.type ONLINE ONLINE rac1 ITPUB個人空間u L-I(HCl%z m"_/ia(p
ora.cvu ora.cvu.type ONLINE ONLINE rac1
^-E&DU_V24558279ora.gsd ora.gsd.type OFFLINE OFFLINE ITPUB個人空間l;CE7c)Z'ou@
ora....network ora....rk.type ONLINE ONLINE rac1
? L7e jhfv24558279ora.oc4j ora.oc4j.type ONLINE ONLINE rac1 ITPUB個人空間NipW2i
ora.ons ora.ons.type ONLINE ONLINE rac1 ITPUB個人空間c(H'DP/[bUm
ora....SM1.asm application ONLINE ONLINE rac1 ITPUB個人空間do0J5ywf!]I/@
ora....C1.lsnr application ONLINE ONLINE rac1
%ZUD'M/h.o24558279ora.rac1.gsd application OFFLINE OFFLINE ITPUB個人空間 \;_S\b8uA1@4Db
ora.rac1.ons application ONLINE ONLINE rac1
*J4R _"w#L8ICN {-i24558279ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
4sp^3f8p8d] J(]24558279ora....SM2.asm application ONLINE ONLINE rac2
.?y1F pY4vzpO[24558279ora....C2.lsnr application ONLINE ONLINE rac2
.g2v Rx4I,]24558279ora.rac2.gsd application OFFLINE OFFLINE ITPUB個人空間a9d:ce4zGi)N
ora.rac2.ons application ONLINE ONLINE rac2
u!Vt)Y*h7n;w&N9T0d24558279ora.rac2.vip ora....t1.type ONLINE ONLINE rac2 ITPUB個人空間n]-gd dH3J M
ora....SM3.asm application ONLINE ONLINE rac3
D:\7s's(s[!kDL24558279ora....C3.lsnr application ONLINE OFFLINE ITPUB個人空間 cLk-X0o{J F*F
ora.rac3.gsd application OFFLINE OFFLINE ITPUB個人空間0{M ]G q"f'y
ora.rac3.ons application ONLINE OFFLINE ITPUB個人空間 W3A QI f*^9v{0P
ora.rac3.vip ora....t1.type ONLINE ONLINE rac2 ---漂移 ITPUB個人空間m {K*~ }1q9q7}
ora....rac.svc ora....ce.type ONLINE ONLINE rac1 ITPUB個人空間9O(EFs z r[*q w
ora.racdb.db ora....se.type ONLINE ONLINE rac1
8_(b*d"Tr+d R24558279ora....ry.acfs ora....fs.type ONLINE ONLINE rac1 ITPUB個人空間}/xxu%m$o9U
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
nFDtI245582796、關閉INSTANCE 和VIP(10g需要關閉ASM,11G因為OCR一般在ASM下面所以不能關閉ASM)
:} JQL7J w*P24558279[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/srvctl stop instance -d RACDB -n rac3
:?/s.j9X0y o'}] `24558279[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/srvctl stop vip -n rac3 -fITPUB個人空間@7tzp:MD
PRCC-1017 : rac3vip was already stopped on rac3
1g1P8Z+p$DT"v24558279PRCR-1005 : Resource ora.rac3.vip is already stoppedITPUB個人空間itA%yAojz
[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/srvctl stop vip -i rac3 -f
o,bJ,C{VQm24558279發生漂移需要指定名字才能關閉ITPUB個人空間r"o i#w,qQj#?.L6Q
[grid@rac2 ~]$ crs_stat -t
6T'v$aB0Q)E;O n24558279Name Type Target State Host ITPUB個人空間U7TrfE[2Zr
------------------------------------------------------------ITPUB個人空間;Yxj pA6k:F9IOW^
ora.CSS.dg ora....up.type ONLINE OFFLINE ITPUB個人空間7cc.NR)yP5h^{
ora.CSS2.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間 So IsYZ|J
ora.DATA1.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間@n!a;l9}Q
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間(R `Q8t L5R o%XI
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間"F9deHjIJ
ora.asm ora.asm.type ONLINE ONLINE rac1 ITPUB個人空間@_4o X.B VV9[nZ
ora.cvu ora.cvu.type ONLINE ONLINE rac1 ITPUB個人空間 j XB!pp"TX
ora.gsd ora.gsd.type OFFLINE OFFLINE ITPUB個人空間w9E[nL$e
ora....network ora....rk.type ONLINE ONLINE rac1
-Jby3SR(K*],w24558279ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
h u(W[ v#O,z4a24558279ora.ons ora.ons.type ONLINE ONLINE rac1 ITPUB個人空間3Ot-A[E*SFv$L q;f"_
ora....SM1.asm application ONLINE ONLINE rac1 ITPUB個人空間}d2R pA`
ora....C1.lsnr application ONLINE ONLINE rac1 ITPUB個人空間0Lj.C2\%xL S
ora.rac1.gsd application OFFLINE OFFLINE
$qs S~I24558279ora.rac1.ons application ONLINE ONLINE rac1
T7YL){ W5_"T3vJ4s24558279ora.rac1.vip ora....t1.type ONLINE ONLINE rac1 ITPUB個人空間W;hA7Mxd!d
ora....SM2.asm application ONLINE ONLINE rac2
u"^OT5?c j-kw-P{24558279ora....C2.lsnr application ONLINE ONLINE rac2 ITPUB個人空間;uj0Y)c"R Ui
ora.rac2.gsd application OFFLINE OFFLINE
#CT Fg O24558279ora.rac2.ons application ONLINE ONLINE rac2
!HbI7N{'{[24558279ora.rac2.vip ora....t1.type ONLINE ONLINE rac2 ITPUB個人空間0L[t|P"K*J0T
ora....SM3.asm application ONLINE ONLINE rac3 ITPUB個人空間w,uY E5~(V(vIS
ora....C3.lsnr application ONLINE OFFLINE ITPUB個人空間/{wvF5w%l1eb
ora.rac3.gsd application OFFLINE OFFLINE
&x&CCoNW24558279ora.rac3.ons application ONLINE OFFLINE ITPUB個人空間T.n!`'H2bH r;A
ora.rac3.vip ora....t1.type OFFLINE OFFLINE ---已經關閉
lY/H.pi24558279ora....rac.svc ora....ce.type ONLINE ONLINE rac1
&\%ax:Q8f!D+R$m|24558279ora.racdb.db ora....se.type ONLINE ONLINE rac1
8M4bwM8S\+s24558279ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
$}K u+Qb%aq24558279ora.scan1.vip ora....ip.type ONLINE ONLINE rac1 ITPUB個人空間$@_$m3{p&{ W.H;D
7、
*xpm$F%?]5B24558279修改VIP 資源
.b3x'Rb Yb!MV&~4sp2w24558279[root@rac3 etc]# /oracle/app/grid/product/11.2.0/bin/srvctl modify nodeapps -n rac3 -A rac3vip/255.255.255.0/eth0 ITPUB個人空間n R|yNp
8、啟動VIP資源和例項
-G6]+p K]KEe24558279srvctl start vip -n rac3
"~:Y4{Q,M24558279srvctl start instance -d racdb -n rac3ITPUB個人空間rU2W[g#~*Y|4`
9、驗證
dZDV(kq"Q oN24558279檢視crs_stat 看到VIP 資源已經在RAC3啟動
q^-B[u24558279[grid@rac3 ~]$ crs_stat -tITPUB個人空間#yK}O*{9{_3[3W
Name Type Target State Host ITPUB個人空間/S:c+s2w;R3v
------------------------------------------------------------
1_'F0j,]3Xj24558279ora.CSS.dg ora....up.type ONLINE OFFLINE ITPUB個人空間 Bd5ol9dEs_S
ora.CSS2.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間%K qE;}gL$?oI
ora.DATA1.dg ora....up.type ONLINE ONLINE rac1
FRG(^:KR24558279ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
FZ4i:v#B^E9]M24558279ora....N1.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間+X S!sP]W
ora.asm ora.asm.type ONLINE ONLINE rac1
7IXz%XF%Ea24558279ora.cvu ora.cvu.type ONLINE ONLINE rac1 ITPUB個人空間 s{iA&ZfD
ora.gsd ora.gsd.type OFFLINE OFFLINE
x#Z@HI-\,O I24558279ora....network ora....rk.type ONLINE ONLINE rac1
9x)JK"G?4rB TK3Eq24558279ora.oc4j ora.oc4j.type ONLINE ONLINE rac1 ITPUB個人空間8lu%Qb\8L T(DNZ,Z
ora.ons ora.ons.type ONLINE ONLINE rac1
zjB_cWt N24558279ora....SM1.asm application ONLINE ONLINE rac1 ITPUB個人空間y;vQ-]mn
ora....C1.lsnr application ONLINE ONLINE rac1 ITPUB個人空間3cy/jlE Dg&Rm
ora.rac1.gsd application OFFLINE OFFLINE ITPUB個人空間B2L0h5hQ`aP6O
ora.rac1.ons application ONLINE ONLINE rac1 ITPUB個人空間i(n b%|M2Y[!Q-gk4a
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
/|RH s*dAz7VkT24558279ora....SM2.asm application ONLINE ONLINE rac2
U8Zjepx*wO24558279ora....C2.lsnr application ONLINE ONLINE rac2
3U&Q+?;]+C/TK0^$Q24558279ora.rac2.gsd application OFFLINE OFFLINE ITPUB個人空間 r[.h?4WEP8o
ora.rac2.ons application ONLINE ONLINE rac2
2^E-C-N:j4p6j(l$|24558279ora.rac2.vip ora....t1.type ONLINE ONLINE rac2 ITPUB個人空間3SL}GP"N;`C,V
ora....SM3.asm application ONLINE ONLINE rac3 ITPUB個人空間,IK7j9p\Y&t9`3~\ [2c H
ora....C3.lsnr application ONLINE ONLINE rac3 ITPUB個人空間c$|(A C,KD5s X
ora.rac3.gsd application OFFLINE OFFLINE
Y.h`U,XA3i24558279ora.rac3.ons application ONLINE ONLINE rac3 ITPUB個人空間M7S8ci%O[o BS
ora.rac3.vip ora....t1.type ONLINE ONLINE rac3 ----已經在RAC3啟動
? f;~ f)] Fu24558279ora....rac.svc ora....ce.type ONLINE ONLINE rac1
,gz _&Z"IMF24558279ora.racdb.db ora....se.type ONLINE ONLINE rac1 ITPUB個人空間S(EPF0_&NB$s'{
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1 ITPUB個人空間$Z0x!`bC$w1io2h
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
X.Va LB:s6Q TH24558279檢視IP地址
0z$Y,Z*DL$T.r24558279eth0:1 Link encap:Ethernet HWaddr 00:50:56:B0:00:1C
!|DY"oK Xz Ow*N24558279 inet addr:172.16.1.96 Bcast:172.16.1.255 Mask:255.255.255.0ITPUB個人空間&W |u#q!?+_&?!X(b
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Z*Wm4m,M B+}24558279 Base address:0x2800 Memory:d8920000-d8940000ITPUB個人空間.C&T6ij&k1{
但是進一步發現VIP啟動出現錯誤,而且VIP是PING不通的。ITPUB個人空間"a]]j-N't9V.fp9I
ping 172.16.1.96 是不通的。
!a.M t Y(Nf1fp24558279CRS-5017: The resource action "ora.rac1.vip start" encountered the following error:ITPUB個人空間-X?h&D-i8Xp8S
CRS-5009: The VIP address 172.16.14.56 does not belong to the subnet 172.16.1.0
smkRnt ] ROT}24558279文件如下:
s4f_:M:o^.E2?24558279RAC and Oracle Clusterware Best Practices and Starter Kit (Platform. Independent) [ID 810394.1]

表明VIP必須在同一網段。
O6s j_ pq24558279然後測試PUB是否可以和VIP在不同網段
,lKL6@6Kr#X24558279關閉CRSITPUB個人空間\p a3w2[
修改HOSTSITPUB個人空間!j3P:Q:a`
啟動CRS--啟動NODEAPPS不能啟動
$VdPxQie!X24558279修改NODEAPPSITPUB個人空間HC/K$X]yK
最後啟動VIP發現雖然可以啟動但是啟動後VIP漂移到RAC2
&cW;Qol&l24558279[grid@rac3 crsd]$ crs_stat -t
} i$haQW[)E24558279Name Type Target State Host ITPUB個人空間3neI.Gt!} J
------------------------------------------------------------ITPUB個人空間a^5R[;I!iw
ora.CSS.dg ora....up.type ONLINE OFFLINE
ry_9d,k9_24558279ora.CSS2.dg ora....up.type ONLINE ONLINE rac1 ITPUB個人空間;n2w]$m8S&w
ora.DATA1.dg ora....up.type ONLINE ONLINE rac1
9ph'l#fo'dx24558279ora....ER.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間tJ)s1dCc
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1 ITPUB個人空間 W Unhl$BWI XBLYT
ora.asm ora.asm.type ONLINE ONLINE rac1
d&u"O9t(n S kM24558279ora.cvu ora.cvu.type ONLINE ONLINE rac1
Nw4a4s7H$t6V3C24558279ora.gsd ora.gsd.type OFFLINE OFFLINE
4Oj:Bu!kg24558279ora....network ora....rk.type ONLINE ONLINE rac1 ITPUB個人空間bsc| K"my-IU7q
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1 ITPUB個人空間:}oz?%^Lq4{
ora.ons ora.ons.type ONLINE ONLINE rac1
E`L([9wV24558279ora....SM1.asm application ONLINE ONLINE rac1
V.es)\,U^V24558279ora....C1.lsnr application ONLINE ONLINE rac1 ITPUB個人空間AT:{ y^ bA
ora.rac1.gsd application OFFLINE OFFLINE ITPUB個人空間:[/M/t@*[ b}A
ora.rac1.ons application ONLINE ONLINE rac1
U,^)IW*SK24558279ora.rac1.vip ora....t1.type ONLINE ONLINE rac1 ITPUB個人空間.{&dI7[q
ora....SM2.asm application ONLINE ONLINE rac2 ITPUB個人空間\7r t2xE)E8R F2F
ora....C2.lsnr application ONLINE ONLINE rac2 ITPUB個人空間kO4E OR?5sAtQ&_"x
ora.rac2.gsd application OFFLINE OFFLINE ITPUB個人空間&`!x m,`e(G
ora.rac2.ons application ONLINE ONLINE rac2
lh.p#v&F"?T24558279ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
q5aG/i'B J;^7l Q24558279ora....SM3.asm application ONLINE ONLINE rac3 ITPUB個人空間 b{ V\mU
ora....C3.lsnr application ONLINE OFFLINE ITPUB個人空間y0bN)Glj:i]3\
ora.rac3.gsd application OFFLINE OFFLINE
V:B&zt.E\Lf24558279ora.rac3.ons application ONLINE OFFLINE ITPUB個人空間c2Z b5h e7L]Y
ora.rac3.vip ora....t1.type ONLINE ONLINE rac2 ---漂移
nc:S[}'v"d'@Y24558279ora....rac.svc ora....ce.type ONLINE ONLINE rac1
z U,y/p,CDtEu24558279ora.racdb.db ora....se.type ONLINE ONLINE rac1
[,gWm4hn L8dr gP24558279ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
g`0p$H:I%X24558279ora.scan1.vip ora....ip.type ONLINE ONLINE rac1 ITPUB個人空間.tJ m A^
啟動LISTENERITPUB個人空間.ir.`@8dg
[grid@rac3 crsd]$ /oracle/app/grid/product/11.2.0/bin/srvctl start listener -n rac3
E d[-A?)K'wH.G24558279PRCR-1013 : Failed to start resource ora.LISTENER.lsnr
a+{ \2g%Ow;Q24558279PRCR-1064 : Failed to start resource ora.LISTENER.lsnr on node rac3
{{!Xdm7vy24558279CRS-2674: Start of 'ora.net1.network' on 'rac3' failedITPUB個人空間4? |?*H}lth:t
不能啟動
R$gF8?'F B:KS"R24558279

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

相關文章