Oracle Cloning and Refresh on Direct LUNs

Oracle

Audience
Public
Technology Integrations
Oracle
Source Type
Documentation

Each virtual disk created on a Direct LUN corresponds to a FlashArray™ volume. The process of cloning an Oracle database that is on Direct LUNs is very similar to cloning a database that is on a physical host. In this guide, we'll go through the steps of refreshing a development clone (lvmdev01) running on VM oracle-vm-dev-01 from the production database lvmprd01 running on VM oracle-vm-prod-01.

Environment Details

Database Version : 19c

Storage Type: ASM using ASMLib
  Source Target
VM Name oracle-vm-prod-01 oracle-vm-dev-01
DB Name lvmprd01 lvmdev01

Summary of the Process

The high-level steps to create a new clone can be summarized as follows. This clone will have the same hostname, ASM disk and disk group names, SID as well as DB name as the source database.

  1. Create the target virtual machine
  2. Snapshot source volumes on the FlashArray
  3. Copy snapshot volumes to target volumes
  4. Connect target volumes to the host or host group
  5. Update multipath configuration
  6. Add virtual disks to the clone VM
  7. Mount software volume
  8. Scan ASM disks
  9. Restart the cloned VM
  10. Database clone created - it should automatically come up.

Now that the database has been cloned as exact copy of the source, we can change ASM disk and disk group names, SID, and the DB name. For that we need to perform the following one time steps:

  1. Create a new initialization file
  2. Create a script to create the new control file

Once we have these, we can follow the steps to Refresh an existing clone to refresh the clone with changed parameters

The process to refresh the clone is similar to the steps listed above.

  1. Shutdown the clone database
  2. Unmount ASM disk groups
  3. Delete ASM disks
  4. Snapshot source volumes
  5. Copy snapshot volumes to target volumes
  6. Rename ASM disks on the source
  7. Rename Disk Groups
  8. Startup nomount the database
  9. Create control file
  10. Perform recovery

Oracle ASM is a volume manager and a file system for Oracle database files. Oracle ASM is the recommended storage platform for running Oracle databases and a large majority of the Oracle databases today run on ASM.

If the database is on a filesystem, the procedure to create a clone and refresh it follows the same concepts. It is much simpler because we do not have to worry about the complexities ASM introduces, like the need to setup an ASM instance, device persistence, etc. The ASM operations need to be replaced with corresponding file system operations, if applicable. For eg., mount/unmount of ASM disk groups will get replaced with mount/unmount of the file system.