Veritas Volume Manager 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)

Chapter 9, Administering Volume Snapshots
Creating Instant Snapshots
281
For details of how to create a shared cache object, see “Creating a Shared Cache
Object” on page 294.
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.
5. Use 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
6. 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.