Tuesday, April 17, 2012

Rename Diskgroup.


1) Unmount Diskgroup on All Nodes.

RACG1@:/home/oracle :+ASM1 $asmcmd -p
ASMCMD [+] > umount RACG

RACG2@:/home/oracle :+ASM2 $asmcmd -p
ASMCMD [+] > umount RACG

2) Check on Diskgroup is not mounted.

RACG1@:/dev/oracleasm/disks :+ASM1 $crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
ora.LISTENER.lsnr
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
ora.RACG.dg
               OFFLINE OFFLINE      racg1
               OFFLINE OFFLINE      racg2
ora.asm
               ONLINE  ONLINE       racg1                    Started
               ONLINE  ONLINE       racg2                    Started
ora.eons
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
ora.gsd
               OFFLINE OFFLINE      racg1
               OFFLINE OFFLINE      racg2
ora.net1.network
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
ora.ons
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
ora.registry.acfs
               ONLINE  ONLINE       racg1
               ONLINE  ONLINE       racg2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       racg2
ora.oc4j
      1        OFFLINE OFFLINE
ora.racg1.vip
      1        ONLINE  ONLINE       racg1
ora.racg2.vip
      1        ONLINE  ONLINE       racg2
ora.scan1.vip
      1        ONLINE  ONLINE       racg2

3) Now lets rename Diskgroup from +RACG to +RACD

RACG1@:/dev/oracleasm/disks :+ASM1 $renamedg phase=both dgname=RACG newdgname=RACD verbose=true
NOTE: No asm libraries found in the system

Parsing parameters..

Parameters in effect:

         Old DG name       : RACG
         New DG name          : RACD
         Phases               :
                 Phase 1
                 Phase 2
         Discovery str        : (null)
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=both dgname=RACG newdgname=RACD verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:
KFNDG-00407: file not found; arguments: []

Terminating kgfd context 0x2ba7587250a0

- it failed with KFNDG-00407: file not found; arguments: []
-Lets try again , Add asm_diskstring='/dev/oracleasm/disks/*' to command.

RACG1@:/dev/oracleasm/disks :+ASM1 $renamedg phase=both dgname=RACG newdgname=RACD verbose=true asm_diskstring='/dev/oracleasm/disks/*'
NOTE: No asm libraries found in the system

Parsing parameters..

Parameters in effect:

         Old DG name       : RACG
         New DG name          : RACD
         Phases               :
                 Phase 1
                 Phase 2
         Discovery str        : /dev/oracleasm/disks/*
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=both dgname=RACG newdgname=RACD verbose=true asm_diskstring=/dev/oracleasm/disks/*
Executing phase 1
Discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/DISK2 with disk number:0 and timestamp (32969226 -1320570880)
Identified disk UFS:/dev/oracleasm/disks/DISK3 with disk number:1 and timestamp (32969226 -1320570880)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/DISK2 with disk number:0 and timestamp (32969226 -1320570880)
Identified disk UFS:/dev/oracleasm/disks/DISK3 with disk number:1 and timestamp (32969226 -1320570880)
Checking if the diskgroup is mounted
Checking disk number:0
Checking disk number:1
Checking if diskgroup is used by CSS
Generating configuration file..
KFNDG-00305: file not found

Terminating kgfd context 0x2b03e7d4d0a0

-Again it failed with KFNDG-00305: file not found
-This time Add confirm=true config=/tmp/renamedg to command.

RACG1@:/dev/oracleasm/disks :+ASM1 $renamedg phase=both dgname=RACG newdgname=RACD confirm=true config=/tmp/renamedg verbose=true asm_diskstring='/dev/oracleasm/disks/*'
NOTE: No asm libraries found in the system

Parsing parameters..

Parameters in effect:

         Old DG name       : RACG
         New DG name          : RACD
         Phases               :
                 Phase 1
                 Phase 2
         Discovery str        : /dev/oracleasm/disks/*
         Confirm            : TRUE
         Clean              : TRUE
         Raw only           : TRUE
renamedg operation: phase=both dgname=RACG newdgname=RACD confirm=true config=/tmp/renamedg verbose=true asm_diskstring=/dev/oracleasm/disks/*
Executing phase 1
Discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/DISK2 with disk number:0 and timestamp (32969226 -1320570880)
Identified disk UFS:/dev/oracleasm/disks/DISK3 with disk number:1 and timestamp (32969226 -1320570880)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:/dev/oracleasm/disks/*
Identified disk UFS:/dev/oracleasm/disks/DISK2 with disk number:0 and timestamp (32969226 -1320570880)
Identified disk UFS:/dev/oracleasm/disks/DISK3 with disk number:1 and timestamp (32969226 -1320570880)
Checking if the diskgroup is mounted
Checking disk number:0
Checking disk number:1
Checking if diskgroup is used by CSS
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for /dev/oracleasm/disks/DISK2
Modifying the header
Looking for /dev/oracleasm/disks/DISK3
Modifying the header
Completed phase 2
Terminating kgfd context 0x2b2b6ce750a0

And it successfully Renamed.

4) Mount Renamed Diskgroup +RACD on All Nodes.

RACG1@:/home/oracle :+ASM1 $asmcmd mount RACD
RACG2@:/home/oracle :+ASM2 $asmcmd mount RACD

5) Confirm on All Nodes.

RACG1@:/home/oracle :+ASM1 $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  EXTERN  N         512   4096  1048576      1019      623                0             623              0             N  CRSDG/
MOUNTED  EXTERN  N         512   4096  1048576      2038     1941                0            1941              0             N  RACD/

RACG2@:/home/oracle :+ASM2 $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  EXTERN  N         512   4096  1048576      1019      623                0             623              0             N  CRSDG/
MOUNTED  EXTERN  N         512   4096  1048576      2038     1941                0            1941              0             N  RACD/

No comments:

Post a Comment