High Availbility

OS & Virtualization

Thursday, May 31, 2012

Cloning with Direct NFS

Clonedb is a new Direct NFS (DNFS) feature introduced in the 11.2.0.2.  clonedb uses dNFS technology to instantly fire up a clone using an existing backup of a database as the data store. The clone uses copy-on-write technology, so only changed blocks need to be stored locally, while the unchanged data is referenced directly from the backup files. This drastically increases the speed of cloning a system and means that several separate clones can function against a single set of backup datafiles, thus saving considerable amounts of space.
Configuration, Setup
  • NFS Server : viviana (ES Linux)
  • Primary DB server : Chopin
  • Clone DB server : Wolfgang
Create an file with the following attributes for each NFS server to be accessed using Direct NFSserver:


 viviana
path: 192.168.1.3
export: /u01/nfs/backup mount: C:\backup





Oracle Database uses an ODM library, , to enable Direct NFS. To replace the standard ODM library, , with the ODM NFS library,complete the following steps:



 
Shutdown database
C:\> copy oraodm11.dll oraodm11.dll.stub
C:\> copy /Y oranfsodm11.dll oraodm11.dll
On the NFS server, Export the directory as an NFS share by adding the following lines to the "/etc/exports" file
/u01/nfs/backup  *(rw,wdelay,insecure,no_root_squash,no_subtree_check)







Make sure the NFS service is available after reboot and restart the NFS service.



 
# chkconfig nfs on
# service nfs restart







Take a image backup of the production database:



 
run {
   set nocfau;
   backup as copy database format '/host/backups/prod/%U' ;
}






Use the following views for Direct NFS management:
  • v$dnfs_servers: Shows a table of servers accessed using Direct NFS.
  • v$dnfs_files: Shows a table of files currently open using Direct NFS.
  • v$dnfs_channels: Shows a table of open network paths (or channels) to servers for which Direct NFS is providing files.
  • v$dnfs_stats: Shows a table of performance statistics for Direct NFS


No comments: