Rename ASM SYSDG
Grid Infrastructure has just been installed and it is realized that the name of the ASM system diskgroup was not changed from the default value "+DATA". This post shows how it was possible to change it using the "renamedg" command in Oracle 12c 12.1.0.2.0 grid infrastructure. More information is available at Oracle Support in this document "How To Rename A Diskgroup On ASM 11gR2? (Doc ID 948040.1)"
Verify ASM Disk Information
Gather the following info about the ASM disk for the diskgroup which will be renamed.
[grid@oracle632 ~]$ sqlplus "/ as sysasm"
SQL*Plus: Release 12.1.0.2.0 Production on Tue Aug 19 19:45:24 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
SQL> set linesize 200
SQL> column path format a20
SQL> select name, label, path, header_status, mount_status, mode_status, sector_size from v$asm_disk;
NAME LABEL PATH HEADER_STATU MOUNT_S MODE_ST SECTOR_SIZE
------------------------------ ------------------------------- -------------------- ------------ ------- ------- -----------
SYSTEMDG SYSTEMDG ORCL:SYSTEMDG MEMBER CACHED ONLINE 512
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
[grid@oracle632 ~]$
Stop ASM Diskgroup
Stop the ASM diskgroup as shown below.
[grid@oracle632 ~]$ srvctl stop diskgroup -g DATA
Stop the ASM Instance
Stop the ASM instance and verify that both the ASM diskgroup and the ASM instance are both stopped, using crsctl, as shown below.
[grid@oracle632 ~]$ srvctl stop asm
[grid@oracle632 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
OFFLINE OFFLINE oracle632 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE oracle632 STABLE
ora.asm
OFFLINE OFFLINE oracle632 Instance Shutdown,ST
ABLE
ora.ons
OFFLINE OFFLINE oracle632 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE oracle632 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oracle632 STABLE
--------------------------------------------------------------------------------
[grid@oracle632 ~]$ clear
Rename the ASM Diskgroup
As the linux "grid" user (the user that owns the Grid Infrastructure installation) rename the diskgroup as shown below. The "Terminating kgfd context" message at the end is normal expected output, and does not indicate any error.
[grid@oracle632 ~]$ renamedg dgname=DATA newdgname=SYSTEMDG asm_diskstring='ORCL:SYSTEMDG' verbose=true
Parsing parameters..
Parameters in effect:
Old DG name : DATA
New DG name : SYSTEMDG
Phases :
Phase 1
Phase 2
Discovery str : ORCL:SYSTEMDG
Clean : TRUE
Raw only : TRUE
renamedg operation: dgname=DATA newdgname=SYSTEMDG asm_diskstring=ORCL:SYSTEMDG verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:ORCL:SYSTEMDG
Identified disk ASM:ASM Library - Generic Linux, version 2.0.4 (KABI_V2):ORCL:SYSTEMDG with disk number:0 and timestamp (33006195 -1712144384)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:ORCL:SYSTEMDG
Identified disk ASM:ASM Library - Generic Linux, version 2.0.4 (KABI_V2):ORCL:SYSTEMDG with disk number:0 and timestamp (33006195 -1712144384)
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:SYSTEMDG
Modifying the header
Completed phase 2
Terminating kgfd context 0x7f71b8c220a0
[grid@oracle632 ~]$
Start ASM Instance
Start the ASM instance and verify that it is running as shown below.
[grid@oracle632 ~]$ srvctl start asm
[grid@oracle632 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
OFFLINE OFFLINE oracle632 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE oracle632 STABLE
ora.asm
ONLINE ONLINE oracle632 Started,STABLE
ora.ons
OFFLINE OFFLINE oracle632 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE oracle632 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oracle632 STABLE
--------------------------------------------------------------------------------
Mount Renamed ASM Diskgroup
Using the "asmcmd" utility while connected as the "grid" user (or as the user that owns the GI installation) mount the renamed ASM diskgroup. This will automatically add it to the Oracle Restart configuration, as shown below.
[grid@oracle632 ~]$ asmcmd mount SYSTEMDG
[grid@oracle632 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE oracle632 STABLE
ora.SYSTEMDG.dg
ONLINE ONLINE oracle632 STABLE
ora.asm
ONLINE ONLINE oracle632 Started,STABLE
ora.ons
OFFLINE OFFLINE oracle632 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE oracle632 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oracle632 STABLE
--------------------------------------------------------------------------------
[grid@oracle632 ~]$
Start the Renamed ASM Diskgroup
So that the renamed diskgroup will start on reboot, it must also be "started" with "srvctl" to set the correct status in the cluster configuration as shown below.
[grid@oracle632 ~] $ srvctl start diskgroup
Reboot Server and Verify
This step is optional. If it is a fresh install, and is not yet in production, this is recommended. Verify all resources startup normally as shown below.
[grid@oracle632 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE oracle632 STABLE
ora.SYSTEMDG.dg
ONLINE ONLINE oracle632 STABLE
ora.asm
ONLINE ONLINE oracle632 Started,STABLE
ora.ons
OFFLINE OFFLINE oracle632 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE oracle632 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE oracle632 STABLE
--------------------------------------------------------------------------------
[grid@oracle632 ~]$
Done.
Case where ASM Diskgroup Contains OCR, VOTE, or spfile
This case has to be handled differently, according to Oracle document Rename Diskgroup having OCR , Vote File , ASM SPILE (Doc ID 1335975.1). Here are the steps to be followed for that case. This arose when creating the LXC 2-node Oracle 12c RAC on Linux Containers. The +SYSTEMDG was incorrectly installed as +DATA which is the installer default. It is desired to rename it to +SYSTEMDG following the instructions in Doc. 1335975.1.