Use OracleRac11gR2's new feature renamedg to change diskgroupname
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> memory> lsdgState Type Rebal Sector Block AU Total_MB Free_MB memory Usable_file_MB Offline_disks Voting_files NameMOUNTED normal n 512 4096 1048576 358400 0 358192 0 0 N blocks/mounted normal n 179096 512 4096 1048576 15360 14434 5120 4657 0 y ocrdg/ASMCMD> umount limit> lsdgState Type Rebal Sector Block AU Total_MB Free_MB limit Offline_disks Voting_files NameMOUNTED normal n 512 4096 1048576 15360 14434 0 y ocrdg/
Grid @ sundb01:/home/grid> renamedg-helpNOTE: 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 = trueNOTE: 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: TRUErenamedg operation: phase = both dgname = oasmdgdata01 newdgname = datadg verbose = trueExecuting phase 1 Discovering the group‑ming 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 groupinform Ming 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/rhdisk2Modifying the headerLooking for/dev/unzip the headerCompleted phase 2 Terminating kgfd context 110285ba0grid @ 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 to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith the Real Application Clusters and Automatic Storage Management options
SQL> select name, state from v $ asm_diskgroup;
Name state ------------------------------ ----------- DATADG DISMOUNTEDOCRDG MOUNTED
SQL> alter diskgroup datadg mount;
Diskgroup altered.
SQL> select name, state from v $ asm_diskgroup;
Name state ------------------------------ ----------- DATADG MOUNTEDOCRDG MOUNTED
Grid @ sundb01: /home/grid> memory> lsdgState Type Rebal Sector Block AU Total_MB Free_MB memory Usable_file_MB Offline_disks Voting_files NameMOUNTED normal n 512 4096 1048576 358400 0 358192 0 n datadg/mounted normal n 179096 512 4096 1048576 15360 14434 5120 4657 0 y ocrdg/ASMCMD> exitgrid @ 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 to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith 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, the disk name has not changed even if the diskgroup name is 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/rhdisk3OCRDG_0001/dev/rhdisk4OCRDG_0002/dev/rhdisk5
Delete the OASMDGDATA01 information in crs: grid @ sundb01:/home/grid> crs_statNAME = ora. DATADG. dgTYPE = ora. diskgroup. typeTARGET = ONLINESTATE = ONLINE on sundb01.
NAME = ora. OASMDGDATA01.dgTYPE = ora. diskgroup. typeTARGET = OFFLINESTATE = OFFLINE
Grid @ sundb01:/home/grid> crsctl delete resource ora. OASMDGDATA01.dggrid @ sundb01:/home/grid> crs_stat-tName 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. in the left-side navigation pane. for more information, see <G id = "1"> overview </G>. 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