Applies To:

Operating System(s): RHEL/OEL 5.x and RHEL/OEL 6.x

Oracle Version(s): 11.2.0.1 and higher

Author:

Mahesh Anand Reddy M

Problem:

----------------------------------------------------------------------------------------------------------
How to rename ASM diskgroup in Oracle 12c RAC Database?

Solution:

You can rename a disk group in one of two ways. Using renamedg tool to change disk group name.

Prerequisites:

  1. 1.     Disk group must be dismounted on all nodes in the cluster.

You can do rename the disk group in following ways

Option 1)

This way renames the +DATA to +DBDATA using disk string to locate the disks and verbose option enabled.

Login to the grid user

Syntax:

$renamedg dgname=current dg name newdgname=newdg asm_diskstring=location of disks verbose=true

Example: I want change my disk group name from DATA to DBDATA using renamed utility.

$renamedg  dgname=DATA newdgname=DBDATA asm_diskstring=’/dev/mapper/datap1’  verbose=true

 

Option 2)

Below command generates the configuration file.

$renamedg phase=one dgname=DATA newdgname=DBDATA asm_diskstring=’/dev/mapper/datap1’  config=/tmp/disk.conf verbose=true

configuration file contains below information

/dev/mapper/DATAp1  DATA DBDATA

rename the disk group using configuration file.

$renamedg phase=two dgname=DATA newdgname=DBDATA config=/tmp/disk.conf verbose=true

After renaming the disk groups, you can rename the disks in disk group using to match the disk group name.

Before rename the disks in disk group, you need to mount the disk group in restricted mode.

SQL> alter diskgroup DBADATA rename disks all;

NOTE: after renaming the disk group, original disk group resource in not automatically deleted. You can see the old disk resource in crsctl stat res –t. you can delete manually using srvctl remove diskgroup command