<<Back to Oracle ASM Main Page
How to Use renamedg Utility to Rename ASM DiskGroup
In this post I will change the name of diskgroup from DG_TEST to DG01
Step 1: dismount the DG on all nodes
Step 2: Validate rename DG operation by running remamedg command with check options verbose=true check=true
Step 3: Rename DG using renamedg utility
Step 4: mount the new DG
Step 1: dismount the DG on all nodes
Step 2: Validate rename DG operation by running remamedg command with check options verbose=true check=true
Step 3: Rename DG using renamedg utility
Step 4: mount the new DG
Check out the current DG Configuration
$ asmcmd lsdg DG_TEST
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 102400 102346 0 102346 0 N DG_TEST/
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 102400 102346 0 102346 0 N DG_TEST/
$ asmcmd lsdsk -k
Total_MB Free_MB OS_MB Name Failgroup Site_Name Site_GUID Site_Status Failgroup_Type Library Label Failgroup_Label Site_Label UDID Product Redund Path
51200 51174 51200 DISK011 DISK011 00000000000000000000000000000000 REGULAR AFD Library - Generic , version 3 (KABI_V3) DISK011 UNKNOWN AFD:DISK011
51200 51172 51200 DISK10 DISK10 00000000000000000000000000000000 REGULAR AFD Library - Generic , version 3 (KABI_V3) DISK10 UNKNOWN AFD:DISK10
Total_MB Free_MB OS_MB Name Failgroup Site_Name Site_GUID Site_Status Failgroup_Type Library Label Failgroup_Label Site_Label UDID Product Redund Path
51200 51174 51200 DISK011 DISK011 00000000000000000000000000000000 REGULAR AFD Library - Generic , version 3 (KABI_V3) DISK011 UNKNOWN AFD:DISK011
51200 51172 51200 DISK10 DISK10 00000000000000000000000000000000 REGULAR AFD Library - Generic , version 3 (KABI_V3) DISK10 UNKNOWN AFD:DISK10
Dismount the Diskgroup from All Nodes
SQL> alter diskgroup DG_TEST dismount;
Diskgroup altered.
Validate the Diskgroup Rename without Actually Executing it
$ renamedg dgname=DG_TEST newdgname=DG01 verbose=true check=true
Parsing parameters..
Parameters in effect:
Old DG name : DG_TEST
New DG name : DG01
Phases :
Phase 1
Phase 2
Discovery str : (null)
Check : TRUE
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=DG_TEST newdgname=DG01 verbose=true check=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Checking disk number:1
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for AFD:DISK10
Leaving the header unchanged
Looking for AFD:DISK011
Leaving the header unchanged
Completed phase 2
New DG name : DG01
Phases :
Phase 1
Phase 2
Discovery str : (null)
Check : TRUE
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=DG_TEST newdgname=DG01 verbose=true check=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Checking disk number:1
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for AFD:DISK10
Leaving the header unchanged
Looking for AFD:DISK011
Leaving the header unchanged
Completed phase 2
Rename the DiskGroup
$ renamedg dgname=DG_TEST newdgname=DG01 verbose=true
Parsing parameters..
Parameters in effect:
Old DG name : DG_TEST
New DG name : DG01
Phases :
Phase 1
Phase 2
Discovery str : (null)
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=DG_TEST newdgname=DG01 verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Checking disk number:1
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for AFD:DISK10
Modifying the header
Looking for AFD:DISK011
Modifying the header
Completed phase 2
New DG name : DG01
Phases :
Phase 1
Phase 2
Discovery str : (null)
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=DG_TEST newdgname=DG01 verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK10 with disk number:0 and timestamp (33072750 1124915200)
Identified disk ASM:AFD Library - Generic , version 3 (KABI_V3):AFD:DISK011 with disk number:1 and timestamp (33072750 1124915200)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Checking disk number:1
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for AFD:DISK10
Modifying the header
Looking for AFD:DISK011
Modifying the header
Completed phase 2
Mount the Renamed DiskGroup
SQL> alter diskgroup DG01 mount;
Diskgroup altered.
$ asmcmd lsdg DG01 -g
Inst_ID State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
1 MOUNTED EXTERN N 512 512 4096 1048576 102400 102346 0 102346 0 N DG01/
Inst_ID State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
1 MOUNTED EXTERN N 512 512 4096 1048576 102400 102346 0 102346 0 N DG01/
Lastly Remove the NonExisting DG from CRS
$ srvctl remove diskgroup -g DG_TEST
==========================================================================
Following are acceptable argument for renamedg utility.
$ renamedg -help
Parsing parameters..
phase Phase to execute,
(phase=ONE|TWO|BOTH), default BOTH
phase Phase to execute,
(phase=ONE|TWO|BOTH), default BOTH
dgname Diskgroup to be renamed
newdgname New name for the diskgroup
config intermediate config file
check just check-do not perform actual operation,
(check=TRUE/FALSE), default FALSE
(check=TRUE/FALSE), default FALSE
confirm confirm before committing changes to disks,
(confirm=TRUE/FALSE), default FALSE
(confirm=TRUE/FALSE), default FALSE
clean ignore errors,
(clean=TRUE/FALSE), default TRUE
(clean=TRUE/FALSE), default TRUE
asm_diskstring ASM Diskstring (asm_diskstring='discoverystring',
'discoverystring1' ...)
'discoverystring1' ...)
verbose verbose execution,
(verbose=TRUE|FALSE), default FALSE
(verbose=TRUE|FALSE), default FALSE
keep_voting_files Voting file attribute,
(keep_voting_files=TRUE|FALSE), default FALSE
(keep_voting_files=TRUE|FALSE), default FALSE
Comments
Post a Comment