This post describes how to implement Oracle Database Snapshot Technology on Exadata Machine.
Because Exadata Storage Cell Smart Features, Storage Indexes, IORM and Network Resource Manager work at level of ASM Volume Manager only, (and they don’t work on top of ACFS Cluster File System), the implementation of the snapshot technology is different compared to any other non-Exadata environment.
At this purpuse Oracle has developed a new type of ASM Disk Group called SPARSE Disk Group. It uses ASM SPARSE Grid Disk based on Thin Provisioning to save the database snapshot copies and the associated metadata, and it supports non-CDB and PDB snapshot copy.
The implementation requires the following minimal software versions :
- Exadata Storage Software version 12.1.2.1.0.
- Oracle Database version 12.1.0.2 with bundle patch 5.
How to Implement Exadata Storage Snapshots in a PDB Environment
Check the celldisks for available free space to allocate to a new SPARSE Disk Group
[root@strgceladm01 ~]# cellcli -e list celldisk attributes name,freespace CD_00_strgceladm01 853.34375G CD_01_strgceladm01 853.34375G CD_02_strgceladm01 853.34375G CD_03_strgceladm01 853.34375G CD_04_strgceladm01 853.34375G CD_05_strgceladm01 853.34375G CD_06_strgceladm01 853.34375G CD_07_strgceladm01 853.34375G CD_08_strgceladm01 853.34375G CD_09_strgceladm01 853.34375G CD_10_strgceladm01 853.34375G CD_11_strgceladm01 853.34375G FD_00_strgceladm01 0 FD_01_strgceladm01 0 FD_02_strgceladm01 0 FD_03_strgceladm01 0 [root@strgceladm01 ~]# [root@strgceladm02 ~]# cellcli -e list celldisk attributes name,freespace CD_00_strgceladm02 853.34375G CD_01_strgceladm02 853.34375G CD_02_strgceladm02 853.34375G CD_03_strgceladm02 853.34375G CD_04_strgceladm02 853.34375G CD_05_strgceladm02 853.34375G CD_06_strgceladm02 853.34375G CD_07_strgceladm02 853.34375G CD_08_strgceladm02 853.34375G CD_09_strgceladm02 853.34375G CD_10_strgceladm02 853.34375G CD_11_strgceladm02 853.34375G FD_00_strgceladm02 0 FD_01_strgceladm02 0 FD_02_strgceladm02 0 FD_03_strgceladm02 0 [root@strgceladm02 ~]# [root@strgceladm03 ~]# cellcli -e list celldisk attributes name,freespace CD_00_strgceladm03 853.34375G CD_01_strgceladm03 853.34375G CD_02_strgceladm03 853.34375G CD_03_strgceladm03 853.34375G CD_04_strgceladm03 853.34375G CD_05_strgceladm03 853.34375G CD_06_strgceladm03 853.34375G CD_07_strgceladm03 853.34375G CD_08_strgceladm03 853.34375G CD_09_strgceladm03 853.34375G CD_10_strgceladm03 853.34375G CD_11_strgceladm03 853.34375G FD_00_strgceladm03 0 FD_01_strgceladm03 0 FD_02_strgceladm03 0 FD_03_strgceladm03 0 [root@strgceladm03 ~]#
For each Storage Cell Create a SPARSE Grid Disks as described below
[root@strgceladm01 ~]# cellcli -e CREATE GRIDDISK ALL PREFIX=SPARSE, sparse=true, SIZE=853.34375G Cell disks were skipped because they had no freespace for grid disks: FD_00_strgceladm01, FD_01_strgceladm01, FD_02_strgceladm01, FD_03_strgceladm01. GridDisk SPARSE_CD_00_strgceladm01 successfully created GridDisk SPARSE_CD_01_strgceladm01 successfully created GridDisk SPARSE_CD_02_strgceladm01 successfully created GridDisk SPARSE_CD_03_strgceladm01 successfully created GridDisk SPARSE_CD_04_strgceladm01 successfully created GridDisk SPARSE_CD_05_strgceladm01 successfully created GridDisk SPARSE_CD_06_strgceladm01 successfully created GridDisk SPARSE_CD_07_strgceladm01 successfully created GridDisk SPARSE_CD_08_strgceladm01 successfully created GridDisk SPARSE_CD_09_strgceladm01 successfully created GridDisk SPARSE_CD_10_strgceladm01 successfully created GridDisk SPARSE_CD_11_strgceladm01 successfully created [root@strgceladm01 ~]#
For each Storage Cell List all Grid Disks
[root@strgceladm01 ~]# cellcli -e list griddisk attributes name,size DATAC1_CD_00_strgceladm01 6.294586181640625T DATAC1_CD_01_strgceladm01 6.294586181640625T DATAC1_CD_02_strgceladm01 6.294586181640625T DATAC1_CD_03_strgceladm01 6.294586181640625T DATAC1_CD_04_strgceladm01 6.294586181640625T DATAC1_CD_05_strgceladm01 6.294586181640625T DATAC1_CD_06_strgceladm01 6.294586181640625T DATAC1_CD_07_strgceladm01 6.294586181640625T DATAC1_CD_08_strgceladm01 6.294586181640625T DATAC1_CD_09_strgceladm01 6.294586181640625T DATAC1_CD_10_strgceladm01 6.294586181640625T DATAC1_CD_11_strgceladm01 6.294586181640625T FGRID_FD_00_strgceladm01 2.0717315673828125T FGRID_FD_01_strgceladm01 2.0717315673828125T FGRID_FD_02_strgceladm01 2.0717315673828125T FGRID_FD_03_strgceladm01 2.0717315673828125T RECOC1_CD_00_strgceladm01 1.78143310546875T RECOC1_CD_01_strgceladm01 1.78143310546875T RECOC1_CD_02_strgceladm01 1.78143310546875T RECOC1_CD_03_strgceladm01 1.78143310546875T RECOC1_CD_04_strgceladm01 1.78143310546875T RECOC1_CD_05_strgceladm01 1.78143310546875T RECOC1_CD_06_strgceladm01 1.78143310546875T RECOC1_CD_07_strgceladm01 1.78143310546875T RECOC1_CD_08_strgceladm01 1.78143310546875T RECOC1_CD_09_strgceladm01 1.78143310546875T RECOC1_CD_10_strgceladm01 1.78143310546875T RECOC1_CD_11_strgceladm01 1.78143310546875T SPARSE_CD_00_strgceladm01 853.34375G SPARSE_CD_01_strgceladm01 853.34375G SPARSE_CD_02_strgceladm01 853.34375G SPARSE_CD_03_strgceladm01 853.34375G SPARSE_CD_04_strgceladm01 853.34375G SPARSE_CD_05_strgceladm01 853.34375G SPARSE_CD_06_strgceladm01 853.34375G SPARSE_CD_07_strgceladm01 853.34375G SPARSE_CD_08_strgceladm01 853.34375G SPARSE_CD_09_strgceladm01 853.34375G SPARSE_CD_10_strgceladm01 853.34375G SPARSE_CD_11_strgceladm01 853.34375G [root@strgceladm01 ~]#
From ASM Instance Create a SPARSE Disk Group
SQL> CREATE DISKGROUP SPARSEC1 EXTERNAL REDUNDANCY DISK 'o/*/SPARSE_CD_*' ATTRIBUTE 'compatible.asm' = '12.2.0.1', 'compatible.rdbms' = '12.2.0.1', 'cell.smart_scan_capable'='TRUE', 'cell.sparse_dg' = 'allsparse', 'AU_SIZE' = '4M'; Diskgroup created.
Set the following ASM attributes on the Disk Group hosting the Test Master Database
ALTER DISKGROUP DATAC1 SET ATTRIBUTE 'access_control.enabled' = 'true';
Grant access to the OS RDBMS user used to access to the Disk Group
ALTER DISKGROUP DATAC1 ADD USER 'oracle';
From an ASM Instance Set ownership permissions for every file that belongs solely to the PDB being snapped cloned as per example below
alter diskgroup DATAC1 set ownership owner='oracle' for file '+DATAC1/CDBT/<xxxxxxxxxxxxxxxxxxx>/DATAFILE/system.xxx.xxxxxxx'; alter diskgroup DATAC1 set ownership owner='oracle' for file '+DATAC1/CDBT/<xxxxxxxxxxxxxxxxxxx>/DATAFILE/sysaux.xxx.xxxxxxx'; alter diskgroup DATAC1 set ownership owner='oracle' for file '+DATAC1/CDBT/<xxxxxxxxxxxxxxxxxxx>/DATAFILE/users.xxx.xxxxxxx'; ... ..
Restart the Master Test PDB in Read Only
alter pluggable database PDBTESTMASTER close immediate instances=all; alter pluggable database PDBTESTMASTER open read only;
Create the first PDB Snapshot Copy on Exadata SPARSE Disk Group
Create pluggable database PDBDEV01 from PDBTESTMASTER tempfile reuse create_file_dest='+SPARSEC1' snapshot copy;