Friday, January 11, 2013

Rename ASM disk group on 11gR2

1.First unmount the diskgroup
 

[oracle@vm6 ~]$ asmcmd umount DATA1

2.Verify whether diskgroup has been mounted or not

[oracle@vm6 ~]$ asmcmd lsdg
 

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576      5114     1525                0            1525              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10236    10186                0           10186              0             N  DATA2/

3.Rename diskgroup

[oracle@vm6 ~]$ renamedg phase=both dgname=DATA1 newdgname=DATA3 verbose=true

Parsing parameters..

Parameters in effect:

         Old DG name       : DATA1
         New DG name          : DATA3
         Phases               :
                 Phase 1
                 Phase 2
         Discovery str        : (null)
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=both dgname=DATA1 newdgname=DATA3 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:VOL2 with disk number:0 and timestamp (32970697 -482714624)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:VOL2 with disk number:0 and timestamp (32970697 -482714624)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for ORCL:VOL2
Modifying the header
Completed phase 2
Terminating kgfd context 0xb7e70050

above command fails use asm_diskstring command

 renamedg phase=both dgname=DATA1 newdgname=DATA3 verbose=true asm_diskstring='ORCL:VOL2'

4.Mount the new diskgroup

[oracle@vm6 ~]$ asmcmd mount DATA3

5.Verify the diskgroup
 

[oracle@vm6 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576      5114     1525                0            1525              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10236    10186                0           10186              0             N  DATA2/
MOUNTED  EXTERN  N         512   4096  1048576      1019      967                0             967              0             N  DATA3/
[oracle@vm6 ~]$

No comments: