




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、oracle RAC 更换存储迁移数据我们利用ASM rebalance特性实现更换存储迁移数据的需求基本 零宕机时间(操作步骤总结)1)保证新存储和RAC当前节点间的可用性;2)新存储划分LUN,可以重新规划存储方案;3)迁移OCR和表决盘4)给现有ASM磁盘组添加ASM磁盘(新存储分配的),充分利用ASM REBALANCE技术5)删除原存储的ASM磁盘6)观察期 1 当前存储信息以下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/当前ASM有BACK,DATA,OCR三个磁盘组,总大小7TB,磁盘组主要存放数据文件和归档日志文件,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放在同一个存储上,所以OCR和VOTEDISK也需要迁移到新的存储上。 2 新存储磁盘分区要求:(由存储工程师操作)2.1. 共享存储,两台服务器都可以看到新存储分配的磁盘空间。2.2. 如之前ASM磁盘组所有存储分区大小,个数保持一致。3 划分后磁盘分区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 创建新的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 磁盘组已经成功添加到OCR磁盘信息中迁移vote 文件当前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 创建ASM实例spfile到OCR_NEW创建ASM实例spfile到新创建的OCR_NEW ASM磁盘组上(在一个节点grid用户登录ASM实例执行)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新状态与位置 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.至此整个OCR&VOTING迁移过程结束 9.这里可以重启下集群crs测试OCR&VOTE是否迁移成功,当然你也可以选择不重启,个人建议重启测试下。 查看OCR&VOTE位置及ASM实例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 迁移数据磁盘组数据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等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年妇产科学主治试题及答案
- 2025年中级茶叶加工试题及答案
- 2025年中医肺癌试题及解析答案
- 水利工程重大危险源防护措施
- 心脏康复用药护理
- 部编版语文一年级下册教学制度计划
- 兰州工业学院《中国古代历史与文化》2023-2024学年第一学期期末试卷
- 泰山职业技术学院《意大利语语音教学》2023-2024学年第一学期期末试卷
- 2025届浙江省省杭州市上城区建兰中学九上数学期末学业质量监测模拟试题含解析
- 河南省信阳浉河区七校联考2024年物理九上期末考试模拟试题含解析
- 新消费系列报告:解构“第五消费时代”-民生证券
- 收心启航+课件-2025-2026学年高三上学期开学主题班会
- 2025年混凝土搅拌站试验员资格考试试题及答案
- 装修公司与工人合同范本
- 工人入场安全教育考核试卷(答案)
- 百色辅警考试题及答案
- 电子仓库考试试题及答案
- 2025消防安全知识培训试题及答案
- ICU鼻饲护理小讲课
- 2025至2030中国厚膜电路陶瓷基板市场竞争态势与未来投资方向预测报告
- 茂名党校科研管理制度
评论
0/150
提交评论