Home > Workload Solutions > Oracle > Guides > Design Guide—Oracle RAC Database on PowerStore T Storage > Creating a DEV database from the PROD snapshot
After creating a thin clone from the snapshot, you can create a DEV database that is based on the snapshot by mounting the thin clone to both the DEV VMs through their ESXi hosts.
To create a DEV database using the thin clone snapshot of ORA_DATA:
DEV database volume design |
||||
Volume group |
Volume name |
Description |
Size (GB) |
Host group |
VM_OCR |
DEV_VM |
Guest VM operating system |
250 |
ORA_DEV_HOST_GROUP |
|
DEV_OCR(1-3) |
Votingdisk/GIMR |
50 |
ORA_DEV_HOST_GROUP |
ORA_TEMP |
DEV_TEMP |
TEMP |
100 |
ORA_DEV_HOST_GROUP |
ORA_Thin_clone |
Thin_clone of PROD_DATA (1-4) |
Data files |
4x600 |
ORA_DEV_HOST_GROUP |
|
Thin_clone of PROD_REDO (1-4) |
REDO LOGs |
4x25 |
ORA_DEV_HOST_GROUP |
|
Thin_clone of PROD_FRA |
FRA |
100 |
ORA_DEV_HOST_GROUP |
For example, the entry for the snapshot thin clone of the PROD_DATA1 is:
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="368ccf0980009e5e46f1b8a8486185d3a", SYMLINK+="oracleasm/disks/ora-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@snapracn1 rules.d]# ls -l /dev/oracleasm/disks
total 0
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-data1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-data2 -> ../../sdg1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-data3 -> ../../sdh1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-data4 -> ../../sdi1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-fra -> ../../sdj1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-ocr1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-ocr2 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-ocr3 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-redo1 -> ../../sdk1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-redo2 -> ../../sdl1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-redo3 -> ../../sdm1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-redo4 -> ../../sdn1
lrwxrwxrwx 1 root root 10 Oct 1 20:03 ora-temp -> ../../sde1
SQL> create diskgroup TEMPDEV external redundancy disk ‘/dev/oracleasm/disks/ora-temp’;
Note: Because these devices are essentially the snapshot of a point-in-time copy of the original PROD database volumes, each volume has the same metadata in the PROD database, such as ASM disk group name and ASM disk name.
$renamedg dgname=DATA newdgname= DATADEV \
asm_diskstring=/dev/oracleasm/disks/* verbose=TRUE
$renamedg dgname=REDO newdgname=REDODEV \
asm_diskstring=/dev/oracleasm/disks/* verbose=TRUE
$renamedg dgname=FRA newdgname=REDOFRA \
asm_diskstring=/dev/oracleasm/disks/* verbose=TRUE
DATA_DEV
$asmcmd mount --restrict DATADEV
$asmcmd mount --restrict REDODEV
$asmcmd mount --restrict FRADEV
SQL> alter diskgroup DATADEV rename disks all
SQL> alter diskgroup REDODEV rename disks all;
SQL> alter diskgroup FRADEV rename disks all;
SQL> alter diskgroup DATADEV diskmount;
SQL> alter diskgroup REDODEV diskmount;
SQL> alter diskgroup FRADEV diskmount;
SQL> alter diskgroup DATADEV mount;
SQL> alter diskgroup REDODEV mount;
SQL> alter diskgroup FRADEV mount;
Note: You will need to change these names in all references to file paths and in the destinations setting in the spfile. These file paths reference the old disk group names, which are no longer valid.
For example, you can rename the database file by running the following SQL command:
SQL>alter database rename file '+DATA/PROD/DATAFILE/users.261.986035293'
to '+DATADEV/PROD/DATAFILE/users.261.986035293';
SQL> ALTER DATABASE END BACKUP;
SQL> ALTER DATABASE OPEN;