Oracle ASM
supports creation of a traditional file system on top of an ASM disk group. This
file system is accessible to applications once mounted, and it supports all
kinds of application files, and has been known as ACFS.
The ACFS
file system has a storage snapshot feature. A storage snapshot is an image of a file
system as it existed at some point in time. Storage snapshots are fast and
efficient because they do not consume disk space or resources at creation time.
They can be created as read-only or read-write snapshots.
Only when
the file system contents are updated, do the ACFS drivers work to maintain the snapshot.
This is
called copy-on-write technology, and enables the initial duplication of large
file systems with little effort.
Starting
version 12.1, ACFS supports storage of database datafiles in the Grid
Infrastructure environment.
In this
doc, we will create a container database on top of an ACFS file system first.
Next, we
will use the ACFS storage snapshot feature to rapidly duplicate one of the tenant
databases.
We will use
the STORAGE SNAPSHOT capability of the CREATE PLUGGABLE DATABASE statement.
The requirement for use of STORAGE SNAPSHOT clause is that the source pdb datafiles be stored on a system which supports storage snapshots.
The requirement for use of STORAGE SNAPSHOT clause is that the source pdb datafiles be stored on a system which supports storage snapshots.
When we duplicate an existing pluggable database specifying the storage snapshot argument, ACFS drivers automatically create a read-write storage snapshot, and maintain it.
Duplicating
an existing database otherwise requires copying of the source datafiles to the
new destination which can take a long time, and a lot of storage if the
database is large.
The
exercise will progress in stages.
Stage # 1 – Linux and Oracle Restart install
The ASM storage will use a single external redundancy disk, exposed to ASM as an asmlib disk. We take care to inspect the new disk group’s attributes, and make sure that COMPATIBLE.ADVM is set to 12.1 at least.
Though
not supported, this example uses Oracle Restart for establishing the ASM
environment, for testing purposes.
Stage # 2 - Creation of the asm dynamic volume and asm cluster file system.
We will
use the asm cluster file system to store the database datafiles.
Note that this is only a test, and in fact, storing of database datafiles on ACFS is NOT supported for Oracle Restart.
Note that this is only a test, and in fact, storing of database datafiles on ACFS is NOT supported for Oracle Restart.
Oracle 12.1 only supports database datafile storage on ACFS for Grid Infrastructure.
Stage # 3 – Creation of a test database on the file system
We will
create a test database called CDB2 containing a single PDB called TOOLS.
Stage # 4 – PDB duplication using the storage snapshot feature.
The PDB
named TOOLS will be duplicated using the storage snapshot option of the CREATE
PLUGGABLE DATABASE command.
Stage # 1 – Linux and Oracle Restart install
Stage # 1 – Linux and Oracle Restart install
# Set up asmlib by installing the oracle asmlib rpms.
Next, we identify
the unix kernel and download the correct kernel-specific asmlib driver files as
recommended by oracle asmlib download site.
[oracle@linux12c CDB2]$ uname -r
2.6.18-308.el5
These are
the asmlib listed for the above unix kernel
oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm
oracleasm-support-2.1.8-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
For this example, a single 6 GB asmlib disk named DISK1 is configured before Oracle Restart install.
[oracle@linux12c CDB2]$ /usr/sbin/oracleasm listdisks
DISK1
#Set up Oracle Restart and configure GI for Oracle
Restart
After
configuring the grid and oracle users and the groups asmadmin, asmdba, and
oinstall, the Grid Infrastructure installer GUI can be started. Using the OUI,
and running as the grid user, the option to install and configure grid
infrastructure for standalone environment was selected, and the Oracle Restart environment was created.
# Start up acfs drivers manually as
shown (need to do it each boot for Oracle Restart env)
The drivers
will be loaded up as part of Oracle Restart install, but will not be started
automatically on boot.
If
required, start up the drivers using the acfsload executable found in the grid
home under the bin folder, as shown.
root@linux12c ~]#
/u01/app/grid/product/12.1.0/grid/bin/acfsload start -s
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9392: Validating ADVM/ACFS installation files for
operating system.
ACFS-9393: Verifying ASM Administrator setup.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device
'/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9322: completed
To check
if drivers are loaded, run lsmod | grep oracle
as the root.
This completes the os
and software set up stage.
If required, start up the drivers using the acfsload executable found in the grid home under the bin folder, as shown.
No comments:
Post a Comment