Use the new Oracle RAC 11gR2 feature renamedg to change the diskgroup name
Environment Description:
AIX7.1 + dual-node Oracle Rac 11.2.0.3
Because this Rac is not installed by your own department, it is installed by the Development Department and is now managed by the O & M department. You need to run the asm diskgroup name installation Department specification. Then you need to change oasmdgdata1 to datadg.
Fortunately, the Oracle version is 11gR2. In 11gR2, Oracle has a new feature. You can directly use the renamedg command to change the diskgroup name.
The procedure is as follows.
Grid @ sundb01:/home/grid> asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
Mounted normal n 512 4096 1048576 358400 0 358192 0 N OASMDGDATA01/
Mounted normal n 512 4096 1048576 15360 14434 5120 0 y ocrdg/
ASMCMD> umount oasmdgdata01
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
Mounted normal n 512 4096 1048576 15360 14434 5120 0 y ocrdg/
Grid @ sundb01:/home/grid> renamedg-help
NOTE: No asm libraries found in the system
Parsing parameters ..
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
Confirm before committing changes to disks,
(Confirm = TRUE/FALSE), default FALSE
Clean ignore errors,
(Clean = TRUE/FALSE), default TRUE
Asm_diskstring ASM Diskstring (asm_diskstring = 'discoverystring ',
'Discoverystring1 '...)
Verbose execution,
(Verbose = TRUE | FALSE), default FALSE
Keep_voting_files Voting file attribute,
(Keep_voting_files = TRUE | FALSE), default FALSE
Renamedg is used to change the diskgroup Name:
Grid @ sundb01:/home/grid> renamedg phase = both dgname = oasmdgdata01 newdgname = datadg verbose = true
NOTE: No asm libraries found in the system
Parsing parameters ..
Parameters in effect:
Old DG name: OASMDGDATA01
New DG name: DATADG
Phases:
Phase 1
Phase 2
Discovery str:
Clean: TRUE
Raw only: TRUE
Renamedg operation: phase = both dgname = oasmdgdata01 newdgname = datadg verbose = true
Executing phase 1
Discovering the group
Discovery with string:
Identified disk UFS:/dev/rhdisk2 with disk number: 1 and timestamp (33002374-296274944)
Identified disk UFS:/dev/rhdisk1 with disk number: 0 and timestamp (33002374-296274944)
Checking for hearbeat...
Re-discovering the group
Discovery with string:
Identified disk UFS:/dev/rhdisk2 with disk number: 1 and timestamp (33002374-296274944)
Identified disk UFS:/dev/rhdisk1 with disk number: 0 and timestamp (33002374-296274944)
Checking if the diskgroup is mounted or used by CSS
Checking disk number: 1
Checking disk number: 0
Generating configuration file ..
Completed phase 1
Executing phase 2
Looking for/dev/rhdisk2
Modifying the header
Looking for/dev/rhdisk1
Modifying the header
Completed phase 2
Terminating kgfd context 110285ba0
Grid @ sundb01:/home/grid>
Grid @ sundb01:/home/grid> sqlplus/as sysasm
SQL * Plus: Release 11.2.0.3.0 Production on Fri Oct 10 12:33:31 2014
Copyright (c) 1982,201 1, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select name, state from v $ asm_diskgroup;
NAME STATE
-----------------------------------------
DATADG DISMOUNTED
OCRDG MOUNTED
SQL> alter diskgroup datadg mount;
Diskgroup altered.
SQL> select name, state from v $ asm_diskgroup;
NAME STATE
-----------------------------------------
DATADG MOUNTED
OCRDG MOUNTED
Grid @ sundb01:/home/grid> asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
Mounted normal n 512 4096 1048576 358400 0 358192 n datadg/
Mounted normal n 512 4096 1048576 15360 14434 5120 0 y ocrdg/
ASMCMD>
ASMCMD> exit
Grid @ sundb01:/home/grid> sqlplus/as sysasm
SQL * Plus: Release 11.2.0.3.0 Production on Fri Oct 10 12:39:41 2014
Copyright (c) 1982,201 1, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select name, path from v $ asm_disk;
NAME PATH
----------------------------------------------------------------------
OASMDGDATA01_0000/dev/rhdisk1 ----- from this point, we found that even if the diskgroup name is changed, the disk name has not changed.
OASMDGDATA01_0001/dev/rhdisk2 ----- check the disk header information through kfed and you will still find that the diskgroup name is the previous one.
OCRDG_0000/dev/rhdisk3
OCRDG_0001/dev/rhdisk4
OCRDG_0002/dev/rhdisk5
You also need to delete the OASMDGDATA01 information in crs:
Grid @ sundb01:/home/grid> crs_stat
NAME = ora. DATADG. dg
TYPE = ora. diskgroup. type
TARGET = ONLINE
STATE = ONLINE on sundb01
NAME = ora. OASMDGDATA01.dg
TYPE = ora. diskgroup. type
TARGET = OFFLINE
STATE = OFFLINE
Grid @ sundb01:/home/grid> crsctl delete resource ora. OASMDGDATA01.dg
Grid @ sundb01:/home/grid> crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATADG. dg ora... up. type ONLINE sundb01
Ora... ER. lsnr ora... er. type ONLINE sundb01
Ora... R1.lsnr ora... er. type ONLINE sundb01
Ora... N1.lsnr ora... er. type ONLINE sundb01
Ora. OCRDG. dg ora... up. type ONLINE sundb01
Ora. asm ora. asm. type ONLINE sundb01
Ora. cvu ora. cvu. type ONLINE sundb01
Ora. gsd ora. gsd. type OFFLINE
Ora... SM1.asm application ONLINE sundb01
Ora... 01. lsnr application ONLINE sundb01
Ora... 01. lsnr application ONLINE sundb01
Ora... b01.gsd application OFFLINE
Ora... b01.ons application ONLINE sundb01
Ora... b01.vip ora... t1.type ONLINE sundb01
Ora... SM2.asm application ONLINE sundb02
Ora... 02. lsnr application ONLINE sundb02
Ora... 02. lsnr application ONLINE sundb02
Ora... b02.gsd application OFFLINE
Ora... b02.ons application ONLINE sundb02
Ora... b02.vip ora... t1.type ONLINE sundb02
Ora... network ora... rk. type ONLINE sundb01
Ora. productname ora. productname. type ONLINE sundb02
Ora. ons ora. ons. type ONLINE sundb01
Ora... ry. acfs ora... fs. type ONLINE sundb01
Ora. scan1.vip ora... ip. type ONLINE sundb01
Migration from 32-bit to 64-bit for a single Oracle instance
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian