Veritas Volume Manager 5.0 Administrator's Guide (September 2006)

316 Administering volume snapshots
Creating instant snapshots
To create a space-optimized instant snapshot, snapvol, and also create a cache
object for it to use:
# vxsnap [-g diskgroup] make source=vol/newvol=snapvol\
[/cachesize=size][/autogrow=yes][/ncachemirror=number]\
[alloc=storage_attributes]
The cachesize attribute determines the size of the cache relative to the size of the
volume. The
autogrow attribute determines whether VxVM will automatically
enlarge the cache if it is in danger of overflowing. By default, the cache is not grown.
Note: If autogrow is enabled, but the cache cannot be grown, VxVM disables the
oldest and largest snapshot that is using the same cache, and releases its cache space
for use.
The
ncachemirror attribute specifies the number of mirrors to create in the cache
volume. For backup purposes, the default value of 1 should be sufficient.
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
3 If 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.
4 You 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