千家信息网

ASM重命名包含OCR/vote file的磁盘组

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,Rename Diskgroup having OCR , Vote File , ASM SPILE [ID 1335975.1]适用于11R2;11R2提供renamedg,可在磁盘组dismou
千家信息网最后更新 2025年02月01日ASM重命名包含OCR/vote file的磁盘组
Rename Diskgroup having OCR , Vote File , ASM SPILE [ID 1335975.1]适用于11R2;11R2提供renamedg,可在磁盘组dismount时将其重命名;如果该磁盘组包含OCR/vote file,则dismount前需将其迁移至中间磁盘;大致思路如下:创建一个临时磁盘组temp,将OCR/vote file迁移至此;将spfile也迁移到temp,重启CRS;卸载并重命名原磁盘组,并重新加载;将ocr/vote file/spfile迁回,重启CRS;创建临时磁盘组create diskgroup TEMP normal redundancydisk 'ORCL:DISK4' ,'ORCL:DISK5' ,'ORCL:DATA4' ,'ORCL:DATA6'attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'='4M';迁移ocr/vote file$ORACLE_HOME/bin/bin/ocrconfig -add +TEMP$ORACLE_HOME/bin/bin/ocrconfig -delete +DATA$ORACLE_HOME/bin/crsctl replace votedisk +TEMP完成后调用ocrcheck检查完整性迁移spfile重启CRScrsctl stop crscrsctl start crs重命名磁盘组alter diskgroup data dismount; renamedg phase=both dgname=DATA newdgname=CRS verbose=true输出如下Parsing parameters..Parameters in effect:Old DG name : DATANew DG name : CRSPhases :Phase 1Phase 2Discovery str : (null)Clean : TRUERaw only : TRUErenamedg operation: phase=both dgname=DATA newdgname=CRS verbose=trueExecuting phase 1Discovering the groupPerforming discovery with string:Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK1 with disk number:0 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK2 with disk number:1 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK3 with disk number:2 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:5 and timestamp (32955539 -2120261632)Checking for hearbeat...Re-discovering the groupPerforming discovery with string:Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK1 with disk number:0 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK2 with disk number:1 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK3 with disk number:2 and timestamp (32955539 -2120261632)Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:5 and timestamp (32955539 -2120261632)Checking if the diskgroup is mounted or used by CSSChecking disk number:0Checking disk number:1Checking disk number:2Checking disk number:5Generating configuration file..Completed phase 1Executing phase 2Looking for ORCL:DISK1Modifying the headerLooking for ORCL:DISK2Modifying the headerLooking for ORCL:DISK3Modifying the headerLooking for ORCL:DISK6Modifying the headerCompleted phase 2Terminating kgfd context 0xb7ee8050重新加载磁盘组并迁回OCRalter diskgroup CRS mount$ORACLE_HOME/bin/ocrconfig -add +CRS$ORACLE_HOME/bin/ocrconfig -delete +TEMP$ORACLE_HOME/bin/crsctl replace votedisk +CRS迁回spfile并重启CRS删除temp磁盘组并将其信息从集群中移除alter diskgroup TEMP dismount;drop diskgroup temp including contents;srvctl remove diskgroup -g datasrvctl remove diskgroup -g TEMP
0