Sunday, December 30, 2012

Rename ASM Diskgroup (renamedg) notes

This is how we tested the rename dg command available in11gR2. We used kfed before renamedg was available.

1. Create target disk group
2. Dismount target disk group
3. Do a bcv establish /split
4. Use rename dg renamedg phase=one dgname=FSSBCV_DG newdgname=FSSTGT_DG asm_diskstring='/u01/app/oracle/asm_devices/FSSTGT_DG/*' config=/tmp/renamedg.conf verbose=true
Parsing parameters..
Parameters in effect:
         Old DG name       : FSSBCV_DG
         New DG name          : FSSTGT_DG
         Phases               :
                 Phase 1
         Discovery str        : /u01/app/oracle/asm_devices/FSSTGT_DG/*
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=one dgname=FSSBCV_DG newdgname=FSSTGT_DG asm_diskstring=/u01/app/oracle/asm_devices/FSSTGT_DG/* config=/tmp/renamedg.conf verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:/u01/app/oracle/asm_devices/FSSTGT_DG/*
Identified disk UFS:/u01/app/oracle/asm_devices/FSSTGT_DG/emcpowerd1 with disk number:0 and timestamp (32950513 1756534784)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:/u01/app/oracle/asm_devices/FSSTGT_DG/*
Identified disk UFS:/u01/app/oracle/asm_devices/FSSTGT_DG/emcpowerd1 with disk number:0 and timestamp (32950513 1756534784)
Checking if the diskgroup is mounted or used by CSS
Checking disk numbe
Generating configuration file..
Completed phase 1
Terminating kgfd context 0x2b59d07cd0a0)
5. Run this kfed read  /dev/emcpowerd1 > /tmp/before_rename_dg.txt
6.  renamedg phase=two dgname=FSSBCV_DG newdgname=FSSTGT_DG config=/tmp/renamedg.conf verbose=true
Parsing parameters..
Parameters in effect:
         Old DG name       : FSSBCV_DG
         New DG name          : FSSTGT_DG
         Phases               :
                 Phase 2
         Discovery str        : (null)
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=two dgname=FSSBCV_DG newdgname=FSSTGT_DG config=/tmp/renamedg.conf verbose=true
Executing phase 2
Looking for /u01/app/oracle/asm_devices/FSSTGT_DG/emcpowerd1
Modifying the header
Completed phase 2
Terminating kgfd context 0x2ae0a28050a0
$
7. Mount the target diskgroups
8. Use nid to rename the target database.

2 comments:

  1. Hello,

    Do we need to specify anything in the configuration file (/tmp/renamedg.conf)? Or it can be empty?

    Thanks,
    Saravana.

    ReplyDelete
  2. Hi Saravana
    You dont need to specify anything. The command creates the file renamedg.conf

    ReplyDelete