top of page
Writer's pictureHanh Nguyen

Rename Diskgroup having OCR , Vote File , ASM SPILE

Basic Steps to Rename the Diskgroup :

1) Create Temporary diskgroup(TEMP) with suitable redundancy for OCR and Vote files.

2) Move OCR and Vote file from <Current diskgroup> to <TEMP>.

3) Change ASM SPFILE location from <current diskgroup> to <TEMP> Diskgroup.

4) Restart CRS in all Nodes to Startup CRS using New SPFILE from <TEMP> Diskgroup.

5) Dismount the OLD Diskgroup in all Cluster Nodes that is not used by CRS.

6) Rename OLD DIskgroup to NEW Diskgroup Name

7) Mount the Renamed Diskgroup .

8) Move OCR and Vote file from TEMP Diskgroup to Renamed Diskgroup.

9) Change ASM SPFILE location from <TEMP diskgroup> to Renamed Diskgroup.

10) Restart CRS in all Nodes to Startup CRS using New SPFILE from Renamed Diskgroup.

11) Drop the Intermediate Diskgroup TEMP.

12) Need to Remove the Diskgroup Resources TEMP and <OLD Diskgroup Name> from Oracle Clusterware .

13) Ensure ALL Cluster Resources are started successfully .

Below assumptions are done :

Name of Temporary diskgroup is TEMP. OCR,Voting Disks and ASM SPFILE is 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.

Details Steps with Commands to Rename the Diskgroup :


1) Create Temporary diskgroup :

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

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’;

Sample Command Output:

SQL> 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’; SQL> 2 3

Diskgroup created.

2) Move OCR and Vote file from <Current diskgroup> to <TEMP> :

$ORACLE_HOME/bin/bin/ocrconfig -add +TEMP $ORACLE_HOME/bin/bin/ocrconfig -delete +DATA $ORACLE_HOME/bin/crsctl replace votedisk +TEMP

Sample Command Output:

[root@test ~]# $ORACLE_HOME/bin/ocrconfig -add +TEMP [root@test ~]# date Mon Jul 4 21:10:16 IST 2011

[root@test ~]# $ORACLE_HOME/bin/ocrconfig -delete +DATA [root@test ~]# date Mon Jul 4 21:10:40 IST 2011

[root@test ~]# $ORACLE_HOME/bin/crsctl replace votedisk +TEMP Successful addition of voting disk 9d351cfdbef64facbfe2d1519880ef33. Successful addition of voting disk 302c23b19e864f92bfa68eda9045e5cc. Successful addition of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b. Successful deletion of voting disk 32f7d65cf17d4fa3bf2932998251635f. Successful deletion of voting disk 10c31fb0891d4f5abfb38ef34cd49f4d. Successful deletion of voting disk 7d6f7d6480554f01bfc2621a3adb8f5f. Successfully replaced voting disk group with +TEMP. CRS-4266: Voting file(s) successfully replaced

[root@test ~]# date Mon Jul 4 21:11:28 IST 2011

[root@test ~]# $ORACLE_HOME/bin/crsctl query css votedisk ## STATE File Universal Id File Name Disk group — —– —————– ——— ——— 1. ONLINE 9d351cfdbef64facbfe2d1519880ef33 (ORCL:DISK4) [TEMP] 2. ONLINE 302c23b19e864f92bfa68eda9045e5cc (ORCL:DISK5) [TEMP] 3. ONLINE 6eeca4920acb4f8fbf6ec5a4e2b8ea7b (ORCL:DATA4) [TEMP] Located 3 voting disk(s). [root@test ~]#

[root@test ~]# $ORACLE_HOME/bin/ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2804 Available space (kbytes) : 259316 ID : 1778064925 Device/File Name : +TEMP Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

3) Change ASM SPFILE location from <Current diskgroup> to <TEMP> Diskgroup.

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

create pfile=’/tmp/init/init’ from spfile;

create spfile=’+TEMP’ from pfile=’/tmp/init/init’;

Now GPNPTOOL will get updated with new ASM SPFILE location.

That can be verified by below command : $ORACLE_HOME/bin/gpnptool get

4) Restart CRS in all Nodes to Startup CRS using New SPFILE from <TEMP> Diskgroup :

crsctl stop crs

crsctl start crs

5) Dismount the OLD Diskgroup in all Cluster Nodes that is not used by CRS :

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

alter diskgroup data dismount;

Sample Command Output:

SQL> SQL> alter diskgroup data dismount;

Diskgroup altered.

SQL> !date Mon Jul 4 21:38:28 IST 2011

6) Rename OLD DIskgroup to NEW Diskgroup Name :

renamedg phase=both dgname=DATA newdgname=CRS verbose=true

Sample Command Output:

[grid@test ~]$ 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 [grid@test ~]$

SQL> set line 1000 set pages 599 col path format a30 select name,path,group_number,header_status,total_mb,free_mb from v$asm_disk; select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup; SQL> SQL> SQL> NAME PATH GROUP_NUMBER HEADER_STATU TOTAL_MB FREE_MB —————————— —————————— ———— ———— ———- ———- ORCL:DISK1 0 MEMBER 0 0 ORCL:DISK2 0 MEMBER 0 0 ORCL:DISK3 0 MEMBER 0 0 ORCL:DISK6 0 MEMBER 0 0 DATA1 ORCL:DATA1 2 MEMBER 977 642 DATA2 ORCL:DATA2 2 MEMBER 977 642 DATA3 ORCL:DATA3 1 MEMBER 15109 9982 DATA4 ORCL:DATA4 3 MEMBER 252 76 DATA6 ORCL:DATA6 3 MEMBER 860 576 DISK4 ORCL:DISK4 3 MEMBER 668 376 DISK5 ORCL:DISK5 3 MEMBER 668 372

11 rows selected.

SQL> NAME STATE USABLE_FILE_MB TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB —————————— ———– ————– ———- ———- ———————– DATA1 MOUNTED 9982 15109 9982 0 FLASH MOUNTED 642 1954 1284 0 TEMP MOUNTED 552 2448 1400 296 CRS DISMOUNTED 0 0 0 0

7) Mount the Renamed Diskgroup :

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

alter diskgroup CRS mount;

Sample Command Output:

SQL> alter diskgroup CRS mount;

Diskgroup altered.

SQL> select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup;

NAME STATE USABLE_FILE_MB TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB —————————— ———– ————– ———- ———- ———————– DATA1 MOUNTED 9982 15109 9982 0 FLASH MOUNTED 642 1954 1284 0 TEMP MOUNTED 552 2448 1400 296 CRS MOUNTED 1196 3596 2644 252

SQL> !date Mon Jul 4 21:52:05 IST 2011

8) Move OCR and Vote file from TEMP Diskgroup to Renamed Diskgroup :

$ORACLE_HOME/bin/ocrconfig -add +CRS $ORACLE_HOME/bin/ocrconfig -delete +TEMP $ORACLE_HOME/bin/crsctl replace votedisk +CRS

Sample Command Output:

[root@test ~]# $ORACLE_HOME/bin/ocrconfig -add +CRS [root@test ~]# $ORACLE_HOME/bin/ocrconfig -delete +TEMP [root@test ~]# $ORACLE_HOME/bin/crsctl replace votedisk +CRS Successful addition of voting disk ae0f06430e724fb7bf3757a7cdf8a101. Successful addition of voting disk 1b355413f5904f5abff181938191ed97. Successful addition of voting disk a7f75c9872ac4f6fbf77bbcb10ea17a6. Successful deletion of voting disk 9d351cfdbef64facbfe2d1519880ef33. Successful deletion of voting disk 302c23b19e864f92bfa68eda9045e5cc. Successful deletion of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b. Successfully replaced voting disk group with +CRS. CRS-4266: Voting file(s) successfully replaced [root@test ~]# date Mon Jul 4 21:55:48 IST 2011

9) Change ASM SPFILE location from <TEMP diskgroup> to Renamed Diskgroup:

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

create spfile=’+CRS’ from pfile=’/tmp/init/init’;

Sample Command Output:

SQL> create spfile=’+CRS’ from pfile=’/tmp/init/init’;

File created.

SQL> !date Mon Jul 4 21:56:56 IST 2011

10) Restart CRS in all Nodes to Startup CRS using New SPFILE from Renamed Diskgroup :

crsctl stop crs

crsctl start crs

11) Drop the Intermediate Diskgroup TEMP :

Login as SYSASM using SQLPLUS into ASM instance on One Node and run below Commands:

alter diskgroup TEMP dismount;

drop diskgroup temp including contents;

12) Need to Remove the Diskgroup Resources TEMP and <OLD Diskgroup Name> from Oracle Clusterware :

srvctl remove diskgroup -g data srvctl remove diskgroup -g TEMP

Sample Command Output:

[root@test ~]# $ORACLE_HOME/bin/srvctl remove diskgroup -g data [root@test ~]# $ORACLE_HOME/bin/srvctl remove diskgroup -g TEMP [root@test ~]# date Mon Jul 4 22:10:03 IST 2011

13) Ensure ALL Cluster resources are started successfully using below sample commands :

$ORACLE_HOME/bin/crsctl stat res -init -t $ORACLE_HOME/bin/crsctl check cluster -all $ORACLE_HOME/bin/crsctl stat res -t

1 view0 comments

Recent Posts

See All

12c Grid Infrastructure Quick Reference

This is a 12c Grid Infrastructure quick reference DETAILS “crsctl stat res -t” output example This example is from a 12c GI Flex Cluster...

OCR – Vote disk Maintenace

Prepare the disks For OCR or voting disk addition or replacement, new disks need to be prepared. Please refer to Clusteware/Gird...

Comments


bottom of page