326Administering volume snapshots

Creating instant snapshots

For example, to create the space-optimized instant snapshot, snap4myvol, of the volume, myvol, in the disk group, mydg, on the disk mydg15, and which uses a newly allocated cache object that is 1GB in size, but which can automatically grow in size, use the following command:

#vxsnap -g mydg make source=myvol/new=snap4myvol\ /cachesize=1g/autogrow=yes alloc=mydg15

Note: If a cache is created implicitly by specifying cachesize, and ncachemirror is specified to be greater than 1, a DCO is attached to the cache volume to enable dirty region logging (DRL). DRL allows fast recovery of the cache backing store after a system crash. The DCO is allocated on the same disks as those that are occupied by the DCO of the source volume. This is done to allow the cache and the source volume to remain in the same disk group for disk group move, split and join operations.

2Use fsck (or some utility appropriate for the application running on the volume) to clean the temporary volume’s contents. For example, you can use this command with a VxFS file system:

# fsck -F vxfs /dev/vx/rdsk/diskgroup/snapshot

3If you require a backup of the data in the snapshot, use an appropriate utility or operating system command to copy the contents of the snapshot to tape, or to some other backup medium.

4You now have the following choices of what to do with a space-optimized instant snapshot:

Refresh the contents of the snapshot. This creates a new point-in-time image of the original volume ready for another backup. If synchronization was already in progress on the snapshot, this operation may result in large portions of the snapshot having to be resynchronized. See Refreshing an instant snapshot” on page 337 for details.

Restore the contents of the original volume from the snapshot volume. The space-optimized instant snapshot remains intact at the end of the operation. See Restoring a volume from an instant snapshot” on page 340 for details.