版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、oracle RAC 更換存儲(chǔ)遷移數(shù)據(jù)我們利用ASM rebalance特性實(shí)現(xiàn)更換存儲(chǔ)遷移數(shù)據(jù)的需求基本 零宕機(jī)時(shí)間(操作步驟總結(jié))1)保證新存儲(chǔ)和RAC當(dāng)前節(jié)點(diǎn)間的可用性;2)新存儲(chǔ)劃分LUN,可以重新規(guī)劃存儲(chǔ)方案;3)遷移OCR和表決盤4)給現(xiàn)有ASM磁盤組添加ASM磁盤(新存儲(chǔ)分配的),充分利用ASM REBALANCE技術(shù)5)刪除原存儲(chǔ)的ASM磁盤6)觀察期 1 當(dāng)前存儲(chǔ)信息以下ASM磁盤組、OCR、VOTE信息:ASM磁盤組:ASMCMD> lsdgState Type Rebal Sector
2、60;Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files NameMOUNTED NORMAL N 512 4096 1048576 3071982 3071091
3、160; 298 1535396 0 N BACK/MOUNTED NORMAL N 512 4096 1048576 4095976 1561759
4、 633568 464095 0 N DATA/MOUNTED NORMAL N 512 4096 1048576 102396 101470
5、; 326 50572 0 N OCR/當(dāng)前ASM有BACK,DATA,OCR三個(gè)磁盤組,總大小7TB,磁盤組主要存放數(shù)據(jù)文件和歸檔日志文件,COR文件,以下是各磁盤組磁盤信息:SQL> select NAME,PATH,total_mb,free_mb from
6、 v$asm_disk;NAME PATH TOTAL_MB FREE_MB- - - -BACK_VOL1 &
7、#160; ORCL:BACK_VOL1 1023994 390436DATA_VOL1 ORCL:DATA_VOL1
8、; 1023994 390450DATA_VOL2 ORCL:DATA_VOL2 1023994 390447DATA_VOL3
9、 ORCL:DATA_VOL3 1023994 390426DATA_VOL4 ORCL:DATA_VOL4
10、0; 1023994 1023697DATA_VOL5 ORCL:DATA_VOL5 1023994 1023698DATA_VOL6
11、 ORCL:DATA_VOL6 1023994 1023696OCR_VOL1 ORCL:OCR_VOL1
12、0; 31376 31075OCR_VOL2 ORCL:OCR_VOL2 31376 31077OCR_VOL3
13、 ORCL:OCR_VOL3 39644 3931810 rows selected.OCR&VOTE信息:gridoracle1 bin$ ./ocrcheckStatus of Oracle Cluster Registry is as follows : V
14、ersion : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2720
15、160; Available space (kbytes) : 259400 ID : 2006438789 Device/File Name :
16、 +OCR Device/File integrity check succeeded
17、Device/File not configured Device/File not configured
18、60; Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical
19、corruption check bypassed due to non-privileged user 由于OCR和VOTEDISK都和ASM放在同一個(gè)存儲(chǔ)上,所以O(shè)CR和VOTEDISK也需要遷移到新的存儲(chǔ)上。 2 新存儲(chǔ)磁盤分區(qū)要求:(由存儲(chǔ)工程師操作)2.1. 共享存儲(chǔ),兩臺(tái)服務(wù)器都可以看到新存儲(chǔ)分配的磁盤空間。2.2. 如之前ASM磁盤組所有存儲(chǔ)分區(qū)大小,個(gè)數(shù)保持一致。3 劃分后磁盤分區(qū)rootoracle1 sbin# fdisk -lDisk /dev/cciss/c0d0: 1000.1 G
20、B, 1000171331584 bytes255 heads, 63 sectors/track, 121597 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/cciss/c0d0p1
21、* 1 13 104391 83 Linux/dev/cciss/c0d0p2 14 121597 976623480 8e Linux LVMDisk /dev/sda: 1073.7 GB, 107374182400
22、0 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 1
23、 130541 1048570551 83 LinuxDisk /dev/sdb: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End B
24、locks Id System/dev/sdb1 1 130541 1048570551 83 LinuxDisk /dev/sdc: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes &
25、#160;Device Boot Start End Blocks Id System/dev/sdc1 1 130541 1048570551 83 LinuxDisk /dev/sdd: 1073.7 GB, 1073741824000 bytes255 h
26、eads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdd1 1
27、;130541 1048570551 83 LinuxDisk /dev/sde: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks
28、 Id System/dev/sde1 1 130541 1048570551 83 LinuxDisk /dev/sdf: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device
29、Boot Start End Blocks Id System/dev/sdf1 1 130541 1048570551 83 LinuxDisk /dev/sdg: 1073.7 GB, 1073741824000 bytes255 heads, 63 sec
30、tors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdg1 1 130541
31、0;1048570551 83 LinuxDisk /dev/sdh: 107.3 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id Syste
32、m/dev/sdh1 1 4000 32129968+ 83 Linux/dev/sdh2 4001 8000 32130000 83 Linux/dev/sdh3 &
33、#160; 8001 13054 40596255 83 LinuxWARNING: The size of this disk is2.9 TB (2919504019456 bytes).DOS partition table format can not be used on drives for volumeslarger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID partition
34、table format (GPT).Disk /dev/sdi: 2919.5 GB, 2919504019456 bytes255 heads, 63 sectors/track, 354942 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdi1 &
35、#160; 1 130000 1044224968+ 83 Linux/dev/sdi2 130001 267349 1103255842+ 83 LinuxDisk /dev/sdj: 1073.7 GB, 1073741824000 bytes -新加盤255 heads, 6
36、3 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdj doesn't contain a valid partition tableDisk /dev/sdk: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdk doesn'
37、t contain a valid partition tableDisk /dev/sdl: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdl doesn't contain a valid partition tableDisk /dev/sdm: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track
38、, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdm doesn't contain a valid partition tableDisk /dev/sdn: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdn doesn't contain a val
39、idpartition tableDisk /dev/sdo: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdo doesn't conain a valid partition tableDisk /dev/sdp: 1073.7 GB, 1073741824000 bytes255 heads, 63 sectors/track, 130541 cylinder
40、sUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdp doesn't contain a valid partition tableDisk /dev/sdq: 107.3 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdq doesn't contain a valid partition tableDi
41、sk /dev/sdr: 2919.5 GB, 2919504019456 bytes255 heads, 63 sectors/track, 354942 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdr doesn't contain a valid partition tableDisk /dev/sds: 322.1 GB, 322122547200 bytes255 heads, 63 sectors/track, 39162 cylindersUnits = cylinders of
42、 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sds1 1 39162 314568733+ 8e Linux LVMDisk /dev/
43、sdt: 322.1 GB, 322122547200 bytes255 heads, 63 sectors/track, 39162 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdt1
44、; 1 39162 314568733+ 8e Linux LVM4 配置ASM新磁盤/etc/init.d/oracleasm createdisk DATA_VOL01 /dev/sdj1/etc/init.d/oracleasm createdisk DATA_VOL02 /dev/sdk1/etc/init.d/oracleasm createdisk DATA_VOL03 /dev/sdl1/etc/init.d/oracleasm createdisk DATA_VOL04
45、/dev/sdm1/etc/init.d/oracleasm createdisk DATA_VOL05 /dev/sdn1/etc/init.d/oracleasm createdisk DATA_VOL06 /dev/sdo1/etc/init.d/oracleasm createdisk BACK_VOL01 /dev/sdp1/etc/init.d/oracleasm createdisk OCR_VOL4 /dev/sdq1/etc/init.d/oracleasm createdisk OCR_VOL5 /dev/sdq2/etc/init.d/oracleasm createdi
46、sk OCR_VOL6 /dev/sdq35 創(chuàng)建新的OCRNEW磁盤組su gridsqlplus / as sysasmCREATE DISKGROUP OCRNEW NORMAL REDUNDANCY DISK 'ORCL:OCR_VOL4' NAME VOL4DISK 'ORCL:OCR_VOL5' NAME VOL5DISK 'ORCL:OCR_VOL6' NAME VOL6 ATTRIBUTE 'compatible.asm'='11.2'6 添加OCR信息到OCRNEW
47、;rootoracle1 bin# ./ocrconfig -add +OCRNEW rootoracle1 bin# ./ocrcheck -configOracle Cluster Registry configuration is : Device/File Name : +OCR Device/File Name
48、; : +OCRNEWrootoracle1 bin# more /etc/oracle/ocr.loc#Device/file getting replaced by device +OCRNEW ocrconfig_loc=+OCRocrmirrorconfig_loc=+OCRNEWlocal_only=falserootoracle1 bin#可以看到OCRNEW 磁盤組已經(jīng)成功添加到OCR磁盤信息中遷移vote 文件當(dāng)前votedisk信息gridoracle1 $ crsctl query css vote
49、disk # STATE File Universal Id File Name Disk group- - - - - 1. ONLINE 14f694d9d4414f9ebf85d3ce6b9aef0b (ORCL:OCR_VOL1) OCR 2. ONL
50、INE 9f9ee7281c954f8abfcc6e88c33257ac (ORCL:OCR_VOL2) OCR 3. ONLINE 38114fd602194fa9bf4d05655b3d89b7 (ORCL:OCR_VOL3) OCRLocated 3 voting disk(s).gridoracle1 $ crsctl replace votedisk +OCRNEWSuccessful addition of voting disk 00634ef593ee4f92bf48e8c089cb5565.Successful addition of v
51、oting disk 232159722de04f67bf03a78b757e3bec.Successful addition of voting disk a340d5b23aac4f6fbf9f7b1d59088fa5.Successful deletion of voting disk 14f694d9d4414f9ebf85d3ce6b9aef0b.Successful deletion of voting disk 9f9ee7281c954f8abfcc6e88c33257ac.Successful deletion of voting disk 38114fd602194fa9b
52、f4d05655b3d89b7.Successfully replaced voting disk group with +OCRNEW.CRS-4266: Voting file(s) successfully replaced7 創(chuàng)建ASM實(shí)例spfile到OCR_NEW創(chuàng)建ASM實(shí)例spfile到新創(chuàng)建的OCR_NEW ASM磁盤組上(在一個(gè)節(jié)點(diǎn)grid用戶登錄ASM實(shí)例執(zhí)行)SQL> create pfile='/home/grid/asmpfile.ora' from spfile;File created.SQL> create spfile='
53、+OCRNEW' from pfile='/home/grid/asmpfile.ora'File created.8 刪除ASM磁盤組OCRrootoracle1 bin# ./ocrconfig -delete +OCR查看OCR和VOTE新狀態(tài)與位置 rootoracle1 bin# ./ocrcheck && ./crsctl query css votediskStatus of Oracle Cluster Registry is as follows : Versi
54、on : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2768
55、 Available space (kbytes) : 259352 ID : 2006438789 Device/File Name : +OCRN
56、EW Device/File integrity check succeeded Device/Fi
57、le not configured Device/File not configured Devic
58、e/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruptio
59、n check succeeded# STATE File Universal Id File Name Disk group- - - - - 1. ONLINE 00634ef593ee4f92bf48e8c089cb5565 (ORCL:OCR_VOL4) OCRNEW
60、160;2. ONLINE 232159722de04f67bf03a78b757e3bec (ORCL:OCR_VOL5) OCRNEW 3. ONLINE a340d5b23aac4f6fbf9f7b1d59088fa5 (ORCL:OCR_VOL6) OCRNEWLocated 3 voting disk(s).SYS+ASM1> alter diskgroup OCR dismount; Diskgroup altered.SYS+ASM2> drop diskgroup OCR including contents;
61、0;Diskgroup dropped.SYS+ASM2> SQL> select GROUP_NUMBER,NAME,STATE,type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup;GROUP_NUMBER NAME STATE TYPE TOT
62、AL_MB FREE_MB V COMPATIBILITY- - - - - - - - 1 BACK MOUNTED NORMAL 3071982 3070675 N .0
63、 2 DATA MOUNTED NORMAL 4095976 1561759 N .0 3 OCRNEW
64、 MOUNTED NORMAL 102396 101470 N .0SYS+ASM2> SQL> select GROUP_NUMBER,DISK_NUMBER,STATE,REDUNDANCY,TOTAL_MB,FREE_MB,name,path,failgroup from v$asm_disk order by GROUP_NUMBER;GROUP_NUMBER DISK_NUMBER STATE
65、 REDUNDA TOTAL_MB FREE_MB NAME PATH FAILGROUP- - - - - - - - -
66、160; 0 0 NORMAL UNKNOWN 0 0 ORCL:OCR_VOL1
67、0; 0 1 NORMAL UNKNOWN 0 0 ORCL:OCR_VOL2
68、 0 2 NORMAL UNKNOWN 0 0 ORCL:OCR_VOL3 &
69、#160;1 1 NORMAL UNKNOWN 1023994 1023559 DATA_VOL5 ORCL:DATA_VOL5 DATA_VOL5
70、; 1 0 NORMAL UNKNOWN 1023994 1023559 DATA_VOL4 ORCL:DATA_VOL4 DATA_VOL4
71、160; 1 2 NORMAL UNKNOWN 1023994 1023557 DATA_VOL6 ORCL:DATA_VOL6 DATA_VOL6
72、 2 2 NORMAL UNKNOWN 1023994 390447 DATA_VOL2 ORCL:DATA_VOL2 DATA_
73、VOL2 2 1 NORMAL UNKNOWN 1023994 390450 DATA_VOL1 ORCL:DATA_VOL1
74、160; DATA_VOL1 2 0 NORMAL UNKNOWN 1023994 390436 BACK_VOL1 ORCL:BACK_VOL1
75、 BACK_VOL1 2 3 NORMAL UNKNOWN 1023994 390426 DATA_VOL3 ORCL:DATA_VOL3
76、60; DATA_VOL3 3 0 NORMAL UNKNOWN 31376 31075 VOL4 ORCL:OCR_VOL4
77、160; VOL4GROUP_NUMBER DISK_NUMBER STATE REDUNDA TOTAL_MB FREE_MB NAME PATH
78、0; FAILGROUP- - - - - - - - - 3 1 NORMAL UNKNOWN 31376 31077 VOL5
79、 ORCL:OCR_VOL5 VOL5 3 2 NORMAL UNKNOWN 39644 39318 VOL6
80、; ORCL:OCR_VOL6 VOL613 rows selected.至此整個(gè)OCR&VOTING遷移過程結(jié)束 9.這里可以重啟下集群crs測(cè)試OCR&VOTE是否遷移成功,當(dāng)然你也可以選擇不重啟,個(gè)人建議重啟測(cè)試下。 查看OCR&VOTE位置及ASM實(shí)例spfile位置rootoracle1 bin# ./ocrcheck &
81、amp;& ./crsctl query css votediskStatus of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) :
82、160; 262120 Used space (kbytes) : 2768 Available space (kbytes) : 259352 ID
83、 : 2006438789 Device/File Name : +OCRNEW Device/File integrity check succeeded
84、60; Device/File not configured Device/File not configured
85、 Device/File not configured Device/File not configured
86、160; Cluster registry integrity check succeeded Logical corruption check succeeded# STATE File Universal Id File Name Disk group- - -
87、 - - 1. ONLINE 00634ef593ee4f92bf48e8c089cb5565 (ORCL:OCR_VOL4) OCRNEW 2. ONLINE 232159722de04f67bf03a78b757e3bec (ORCL:OCR_VOL5) OCRNEW 3. ONLINE a340d5b23aac4f6fbf9f7b1d59088fa5 (ORCL:OCR_VOL6) OCRNEWLocated 3 voting disk
88、(s).SQL> show parameter spfile;NAME TYPE VALUE- - -spfile
89、160; string +OCRNEW/oracle-cluster/asmpara meterfile/registry.253.8456918
90、 87SQL> 10 遷移數(shù)據(jù)磁盤組數(shù)據(jù)SQL> alter diskgroup DATA add disk 'ORCL:DATA_VOL01' rebalance power 11;Diskgroup altered.SQL> alter diskgroup DATA add
91、 disk 'ORCL:DATA_VOL02' rebalance power 11;Diskgroup altered.SQL> alter diskgroup DATA add disk 'ORCL:DATA_VOL03' rebalance power 11;Diskgroup altered.SQL> alter diskgroup DATA add disk 'ORCL:DATA_VOL04' rebalance power 11;Diskgroup altered.SQL> alter diskgroup back add disk 'ORCL:DATA_VOL05' rebalance power 11;Diskgroup altered.SQL> alter diskgroup back add disk 'ORCL:DATA_VOL06'
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年醫(yī)藥生物行業(yè)投資策略報(bào)告:看好創(chuàng)新和出海關(guān)注基本面向上細(xì)分賽道-國(guó)元證券
- 中國(guó)結(jié)腸鏡行業(yè)市場(chǎng)深度分析及發(fā)展前景預(yù)測(cè)報(bào)告
- 項(xiàng)目開發(fā)總結(jié)報(bào)告(合集五)
- 方型太陽(yáng)能警示樁行業(yè)行業(yè)發(fā)展趨勢(shì)及投資戰(zhàn)略研究分析報(bào)告
- 商場(chǎng)項(xiàng)目可行性報(bào)告
- 2024河南其他電氣機(jī)械及器材制造市場(chǎng)前景及投資研究報(bào)告
- 2025年秋千項(xiàng)目可行性研究報(bào)告
- 2025年半導(dǎo)體封裝行業(yè)研究報(bào)告(附下載)
- 2025辦公設(shè)備維修合同
- 2024江蘇泗陽(yáng)縣交通產(chǎn)業(yè)集團(tuán)招聘第一線操作人員招聘39人易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- GB 19272-2024室外健身器材的安全通用要求
- 北師大版五年級(jí)數(shù)學(xué)下冊(cè)第3單元第3課時(shí)分?jǐn)?shù)乘法(三)課件
- 2025新外研社版英語(yǔ)七年級(jí)下單詞默寫表
- 2024年演出經(jīng)紀(jì)人資格《思想政治與法律基礎(chǔ)》考前必刷必練題庫(kù)500題(含真題、必會(huì)題)
- 麻醉與舒適醫(yī)療
- 全國(guó)林草行業(yè)森林消防員技能競(jìng)賽理論知識(shí)考試題及答案
- 2024年治安保衛(wèi)部規(guī)章制度(2篇)
- 2024年保密知識(shí)測(cè)試試題附答案(綜合卷)
- 豬糞供應(yīng)合同范本
- 人教版2024-2025學(xué)年六年級(jí)數(shù)學(xué)上冊(cè)5.4 扇形的面積 同步練習(xí)(附答案解析)
評(píng)論
0/150
提交評(píng)論