Hi all,
Hope you are all good.
This is the last post showing how to create a clone of ASM Disks to do your DB clone very quickly to use it as a target for GoldenGate.
Just to recap what we did in the last blog post:
Rename of ASM Disks for the cloned (new) disks:
oracleasm renamedisk -f /dev/mapper/3600a0980383041626a2b4c38386e7836p1 DATA_NEW_0001
oracleasm renamedisk -f /dev/mapper/3600a0980383041626a2b4c38386e7837p1 DATA_NEW_0002
oracleasm renamedisk -f /dev/mapper/3600a0980383041626a2b4c38386e7838p1 DATA_NEW_0003
oracleasm renamedisk -f /dev/mapper/3600a098038304162745d4c3964754c34p1 DATA_NEW_0004
oracleasm renamedisk -f /dev/mapper/3600a098038304162745d4c3964754c35p1 DATA_NEW_0005
oracleasm renamedisk -f /dev/mapper/3600a098038304162745d4c3964754c36p1 DATA_NEW_0006
oracleasm renamedisk -f /dev/mapper/3600a098038304162745d4c3964754c37p1 DATA_NEW_0007
After renamed the disks on first node, let’s scan the disks in the remaining nodes:
oracleasm scandisks
oracleasm listdisks


Now, we need to rename the DiskGroup for new disks. Let's rename to DATA_NEW. As grid (or cluster owner user):
renamedg -dgname DATA -newdgname DATA_NEW asm_diskstring='ORCL:DATA_NEW_0001','ORCL:DATA_NEW_0002','ORCL:DATA_NEW_0003','ORCL:DATA_NEW_0004','ORCL:DATA_NEW_0005','ORCL:DATA_NEW_0006','ORCL:DATA_NEW_0007' verbose=true phase=both
Below we can see the output:
Parameters in effect:



Old DG name : DATA
New DG name : DATA_NEW
Phases :
Phase 1
Phase 2
Discovery str : ORCL:DATA_NEW_0001,ORCL:DATA_NEW_0002,ORCL:DATA_NEW_0003,ORCL:DATA_NEW_0004,ORCL:DATA_NEW_0005,ORCL:DATA_NEW_0006,ORCL:DATA_NEW_0007
Clean : TRUE
Raw only : TRUE
renamedg operation: -dgname DATA -newdgname DATA_NEW asm_diskstring=ORCL:DATA_NEW_0001,ORCL:DATA_NEW_0002,ORCL:DATA_NEW_0003,ORCL:DATA_NEW_0004,ORCL:DATA_NEW_0005,ORCL:DATA_NEW_0006,ORCL:DATA_NEW_0007 verbose=true phase=both
Executing phase 1
Discovering the group
Performing discovery with string:ORCL:DATA_NEW_0001,ORCL:DATA_NEW_0002,ORCL:DATA_NEW_0003,ORCL:DATA_NEW_0004,ORCL:DATA_NEW_0005,ORCL:DATA_NEW_0006,ORCL:DATA_NEW_0007
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0001 with disk number:4 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0002 with disk number:5 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0003 with disk number:6 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0004 with disk number:11 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0005 with disk number:12 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0006 with disk number:13 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0007 with disk number:14 and timestamp (33120467 1504121856)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:ORCL:DATA_NEW_0001,ORCL:DATA_NEW_0002,ORCL:DATA_NEW_0003,ORCL:DATA_NEW_0004,ORCL:DATA_NEW_0005,ORCL:DATA_NEW_0006,ORCL:DATA_NEW_0007
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0001 with disk number:4 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0002 with disk number:5 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0003 with disk number:6 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0004 with disk number:11 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0005 with disk number:12 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0006 with disk number:13 and timestamp (33120467 1504121856)
Identified disk ASM:ASM Library - Generic Linux, version 2.0.12 (KABI_V2):ORCL:DATA_NEW_0007 with disk number:14 and timestamp (33120467 1504121856)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:4
Checking disk number:5
Checking disk number:6
Checking disk number:11
Checking disk number:12
Checking disk number:13
Checking disk number:14
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for ORCL:DATA_NEW_0001
Modifying the header
Looking for ORCL:DATA_NEW_0002
Modifying the header
Looking for ORCL:DATA_NEW_0003
Modifying the header
Looking for ORCL:DATA_NEW_0004
Modifying the header
Looking for ORCL:DATA_NEW_0005
Modifying the header
Looking for ORCL:DATA_NEW_0006
Modifying the header
Looking for ORCL:DATA_NEW_0007
Modifying the header
Completed phase 2
With the DiskGroup renamed, you can mount it:
alter diskgroup DATA_NEW mount;
Now you can proceed with the rest of steps:
  • You must have a PFILE (init) with the parameters pointing to the new DiskGroup names;
  • You must create a trace of controlfile and replace the location of all database files (datafiles, tempfiles, redologs, etc) and use this trace to create the controlfile for new (target) DB.
I will not cover this steps here, but just as example, you must consider changing the following parameters on init:
  • control_files
  • db_create_file_dest
  • db_create_online_log_dest_n
  • db_recovery_file_dest

 

Hope that helps.

 

Peace!

Vinicius