In this article I am illustrating how to rename ASM Disk group in oracle 12c.
The tool renamedg facilitates to rename the ASM disk group(s) in oracle. There are two options available in renamedg tool to rename diskgroup(s).
- Specify “BOTH” argument in the PHASE parameter of renamedg tool.
- Specify “one and two” arguments in the PHASE parameter of renamedg tool.
How to rename the ASM disk group using “BOTH” argument.
- Take the backup of the database (optional, but for the safer side).
- Bring down the database. (If your disk groups are actively used by any Database processes)
- Log in to ASM Instance and :-
- Get disk group(s) and its associated disk(s) details.
- Dismount the disk group(s) from all the nodes.
(You cannot use renamedg tools to rename CRS disk group because: (1) You cannot dismount the disk group , as it’s being used by Cluster actively. (2) You cannot rename the disk group(s) or disk(s) when CRS is down.)
- Use renamedg utility to rename the disk group. This is a command line utility.
- After renaming the disk groups, you can rename the disks in disk group that assign to the disk group. Before rename the disks in disk group, you need to mount the disk group in restricted mode.
- Once rename activities completed, Mount the entire disk group manually that was renamed.
- The original disk group resource is not automatically deleted. The status of the old disk group resource can be checked with the Oracle Clusterware Control (CRSCTL) crsctl stat res -t command and then manually deleted with the Server Control Utility (SRVCTL) srvctl remove disk group command. . If those disk group are associated with Database, you need to remove database resource and add it again.
Quick Commands:
- Get Disk Details
select dg.name “DG Name” ,di.name “Disk Name”,di.path
from v$asm_diskgroup dg, v$asm_disk di
where dg.GROUP_NUMBER=di.GROUP_NUMBER
order by 1;
DG Name | Disk Name | PATH |
PRAD_CTL1 | PRAD_CTL1_0000 | /dev/rhdiskpower10 |
PRAD_CTL2 | PRAD_CTL2_0000 | /dev/rhdiskpower11 |
PRAD_CTL3 | PRAD_CTL3_0000 | /dev/rhdiskpower12 |
PRAD_REDOA1 | PRAD_REDOA1_0000 | /dev/rhdiskpower6 |
PRAD_REDOA2 | PRAD_REDOA2_0000 | /dev/rhdiskpower7 |
PRAD_REDOB1 | PRAD_REDOB1_0000 | /dev/rhdiskpower8 |
PRAD_REDOB2 | PRAD_REDOB2_0000 | /dev/rhdiskpower9 |
PRAD_ROOT | PRAD_ROOT_0000 | /dev/rhdiskpower2 |
PRAD_SEED | PRAD_SEED_0000 | /dev/rhdiskpower5 |
PPRADTRN_DATA1 | PPRADTRN_DATA1_0000 | /dev/rhdiskpower3 |
PPRADTRN_INDX1 | PPRADTRN_INDX1_0000 | /dev/rhdiskpower4 |
- Dismount Diskgroup
alter diskgroup <DG Name> dismount;
- Rename Diskgroup
Syntax: renamedg [phase={one|two |both}] dgname=diskgroup
newdgname=newdiskgroup [config=configfile]
[asm_diskstring=discoverystring, discoverystring …]
[clean={true|false}] [check={true|false}]
[confirm={true|false}] [verbose={ true|false}]
[keep_voting_files={true|false}]
Example: $ renamedg dgname=PRAD_ROOT newdgname=PRAD1_ROOT asm_diskstring=’/dev/emcpowerp1′ verbose=true
- Mount Diskgroup Restricted
alter diskgroup <DG Name> mount restricted;
- Rename Disk name
alter diskgroup <DG Name> rename disks all;
- Mount Diskgroup
alter diskgroup <DG Name> mount;
How to rename the ASM disk group using “one and two” argument ( Only Commands).
Steps are all same as to rename the disk group(s) with “both” argument, except the usage of renamedg.
- Below command generates the configuration file to be used in phase two.
$renamedg phase=one dgname=<Current DG Name> newdgname=<New DG name> asm_diskstring=’/devices/disk*’ config=/tmp/disks.conf verbose=true
- Rename the disk group using configuration file.
$ renamedg phase=two dgname=<Current DG Name> newdgname=<New DG Name> config=/tmp/disks.conf verbose=true
- Mount Diskgroup Restricted
alter diskgroup <DG Name> mount restricted;
- Rename Disk name
alter diskgroup <DG Name> rename disks all;
***