合 ASM重命名包含OCR vote file的磁盘组
Tags: Oracle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 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 redundancy disk '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 重启CRS crsctl stop crs crsctl start crs 重命名磁盘组 alter diskgroup data dismount; renamedg phase=both dgname=DATA newdgname=CRS verbose=true 输出如下 Parsing parameters.. Parameters in effect: Old DG name : DATA New DG name : CRS Phases : Phase 1 Phase 2 Discovery str : (null) Clean : TRUE Raw only : TRUE renamedg operation: phase=both dgname=DATA newdgname=CRS verbose=true Executing phase 1 Discovering the group Performing 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 group Performing 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 CSS Checking disk number:0 Checking disk number:1 Checking disk number:2 Checking disk number:5 Generating configuration file.. Completed phase 1 Executing phase 2 Looking for ORCL:DISK1 Modifying the header Looking for ORCL:DISK2 Modifying the header Looking for ORCL:DISK3 Modifying the header Looking for ORCL:DISK6 Modifying the header Completed phase 2 Terminating kgfd context 0xb7ee8050 重新加载磁盘组并迁回OCR alter 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 data srvctl remove diskgroup -g TEMP |
Rename Diskgroup having OCR , Vote File , ASM SPILE (文档 ID 1335975.1)
In this Document
Goal | |
---|---|
Solution | |
---|---|
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
GOAL
Consider a 11.2 Grid Infrastructure with CLUSTER setup having OCR ,Vote File and ASM SPFILE on a diskgroup. Under certain circumstances you may wish to rename that diskgroup.
"renamedg" utility can be used to rename of the diskgroup when the diskgroup is dismounted.
But since the diskgroup contains OCR and Vote File we need to use an intermediate diskgroup for storing OCR and Vote File temporarily while renaming the actual diskgroup.
SOLUTION
Basic Steps to rename the diskgroup :
\1) Create a temporary diskgroup (TEMP) with suitable redundancy for OCR and Vote files.
\2) Move OCR and Vote file from
\3) Change ASM SPFILE location from
\4) Restart CRS in all Nodes to Startup CRS using New SPFILE from
\5) Dismount the OLD diskgroup in all cluster nodes that is not used by CRS.
\6) Rename OLD diskgroup to NEW diskgroup
\7) Mount the renamed diskgroup .
\8) Move OCR and Vote file from TEMP diskgroup to renamed diskgroup.
\9) Change ASM SPFILE location from
\10) Restart CRS in all nodes to startup CRS using new SPFILE from renamed diskgroup.
NOTE: Modify the asm resource to have the correct password file location else startup CRS will not start the ASM resource
\11) Drop the intermediate diskgroup TEMP.
\12) Need to remove the diskgroup resources TEMP and
\13) Ensure ALL cluster resources are started successfully .
Below assumptions are made :
-> Name of Temporary diskgroup is TEMP.
-> OCR,Voting Disks and ASM SPFILE are originally stored in a diskgroup DATA.
-> Diskgroup DATA should be renamed to CRS.
-> $ORACLE_HOME points to GRID Home.
-> Cluster is up and running in all nodes of RAC.
Detailed steps with commands to rename the diskgroup :
\1) Create a temporary diskgroup :
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:
create diskgroup TEMP normal redundancy disk
attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'=