This is a short article about ACFS and the acfs snapshots feature – a new 11g Release 2 feature: How to create, work with and drop a snapshot.
ACFS is the ASM Cluster File System and ships with Oracle 11g Release 2. For using ACFS first of all an ADVM volume must be created and an ACFS file system created on top of it. The same ACFS file system is available on all nodes in the cluster. The data itself is stored in an ASM disk group. More information can be found here. The documentation is available here and here.
Creating a Snapshot
In our example we use the ACFS volume mounted on /u01/app/oracle/product/11.2.0/ora11p:
To create a snapshot named “snap1” on ACFS /u01/app/oracle/product/11.2.0/ora11p:
Note: You can have up to 63 snapshots on the same file system. They can be created and deleted on the fly. ACFS snapshots provide a point in time consistent view of the file system which can be used for instance for backups.
Sadly there is no functionality which does a “rollback” of the active file system to a snapshot. In case you accidentally deleted a file in the active file system you have to copy it with “cp” from the snapshot to the active file system.
Working with Snapshots
Once created a snapshot is available unter <ACFS Mount Point>/.ACFS/snaps/<snapshot name>:
Display Information about Snapshots
ACFSUTIL can be used to display information about the file system and to display limited information about snapshots:
As shown above ACFSUTIL does not give a list of available snapshots; it just displayss the number of existing snapshots. To query the name of all snapshots change to the directory “<ACFS_MOUNT_POINT>/.ACFS/snaps”. All directories liested there are snapshots (see above).
Snapshots with Enterprise Manager Console
As an alternative you can create snapshots with the EM as well. But (at least as far as i know) you cannot delete them :-)