Introduction:
Once again it showed that the old quote .. what’s in a name .. is still valid even in an Oracle 11.2.0.3.0 Oracle restart environment so credits to William S. for that. Well you might wonder where is he heading with the article with title like this again. Frankly i had set up an Oracle restart environment where during the Installation you are asked about one ( or more ) Asm Disks to be added to a Diskgroup that will hold the Spfile of the ASM instance. During that install i made a typo in the name of the Diskgroup and only noticed of course after finishing install.
I searched the Web and came across a real cool scenario which i have explored and guess what it works ! Below you find the steps i have performed. Environment was: 11.2.0.3 Enterprise Edition on Red Hat Linux.
Details:
On the web I found bloggers sharing the idea that you can indeed rename a diskgroup in 11gr2. The tool for that is on the OS level and is part of you GridInfrastructure software. So it could very well look pretty much like this:
which renamedg /opt/crs/product/11203_ee_64/crs/bin/renamedg
Anyhow i had a bit of a struggle with the syntax but in the end this is the command that does the magic. Note first few attempts failed since I did not add the asm_diskstring in the command line . Be wise and please use it in a modified if necessary way from the beginning:
Step 1 Preparations
As root i stopped the Oracle restart environment :
./crsctl stop has
Step 2 Renaming the Diskgroup
Syntax
renamedg phase=both dgname=DUMM_YDATA newdgname=DUMMY_DATA verbose=true asm_diskstring=’/dev/mapper/asm*p1′
As you can see i am renaming my diskgroup DUMM_YDATA to DUMMY_DATA this way.
Output coming from that was :
NOTE: No asm libraries found in the system
Parsing parameters..
Parameters in effect:
Old DG name : DUMM_YDATA
New DG name : DUMMY_DATA
Phases :
Phase 1
Phase 2
Discovery str : /dev/mapper/asm*p1
Clean : TRUE
Raw only : TRUE
renamedg operation: phase=both dgname=DUMM_YDATA newdgname=DUMMY_DATA verbose=true asm_diskstring=/dev/mapper/asm*p1
Executing phase 1
Discovering the group
Performing discovery with string:/dev/mapper/asm*p1
Identified disk UFS:/dev/mapper/asm-spfile01p1 with disk number:0 and timestamp (33001295 453578752)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:/dev/mapper/asm*p1
Identified disk UFS:/dev/mapper/asm-spfile01p1 with disk number:0 and timestamp (33001295 453578752)
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 /dev/mapper/asm-spfile01p1
Modifying the header
Completed phase 2
Step 3 Where to find the Spfile for ASM in Grid Infra
With this first success it was time to move on to step 2. I modified the information in the cluster layer with this once i had looked up the exact name of the spfile with ASMCMD:
Syntax
srvctl modify asm -p +DUMMY_DATA/asm/asmparameterfile/registry.253.843232019
Step 4 Restarted the Has deamon:
As Root:
./crsctl start has
Step 5 Final activities: Check and cleanup:
SQL> show parameter spfile
NAME TYPE VALUE
------------ ----------- ------------------------------
spfile string +DUMMY_DATA/asm/asmparameterfile/registry.253.843232019
Checked also the information in the Cluster:
oracle@mysrvr10hr:/opt/oracle [+ASM]# crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DUMMY_DATA.dg
ONLINE ONLINE mysrvr10hr
ora.DUMM_YDATA.dg
ONLINE OFFLINE mysrvr10hr
ora.LISTENER.lsnr
ONLINE ONLINE mysrvr10hr
ora.asm
ONLINE ONLINE mysrvr10hr Started
ora.ons
OFFLINE OFFLINE mysrvr10hr
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE mysrvr10hr
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE mysrvr10hr
## checked in asmcmd
asmcmd
[Option -p will be used ]
ASMCMD [+] > spget
+DUMMY_DATA/asm/asmparameterfile/registry.253.843232019
Ok last step, clean up since the cluster still knows about the Diskgroup with the wrong name:
srvctl remove diskgroup -g DUMM_YDATA
Mission completed and again a smiling dba here. Please Test before do !
Happy reading,
Mathijs