Veritas Volume Manager 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)
Creating Instant Snapshots
288 VERITAS Volume Manager Administrator’s Guide
By default, all the plexes are reattached, which results in the removal of the snapshot. If
required, the number of plexes to be reattached may be specified as the value assigned to
the nmirror attribute.
Note The snapshot being reattached must not be open to any application. For example,
any file system configured on the snapshot volume must first be unmounted.
It is possible to reattach a volume to an unrelated volume provided that their sizes
are compatible.
You cannot use the vxsnap syncwait command to wait for synchronization of the
reattached plexes to complete.
For example the following command reattaches one plex from the snapshot volume,
snapmyvol, to the volume, myvol:
# vxsnap -g mydg reattach snapmyvol source=myvol nmirror=1
While the reattached plexes are being resynchronized from the data in the parent volume,
they remain in the SNAPTMP state. After resynchronization is complete, the plexes are
placed in the ACTIVE state.
Note If the volume and its snapshot have both been resized (to an identical smaller or
larger size) before performing the reattachment, a fast resynchronization can still be
performed. A full resynchronization is not required. Version 20 DCO volumes are
resized proportionately when the associated data volume is resized. For version 0
DCO volumes, the FastResync maps stay the same size, but the region size is
recalculated, and the locations of the dirty bits in the existing maps are adjusted. In
both cases, new regions are marked as dirty in the maps.
Restoring a Volume from an Instant Snapshot (vxsnap restore)
It may sometimes be desirable to reinstate the contents of a volume from a backup or
modified replica in a snapshot volume. The following command may be used to restore
one or more volumes from the specified snapshots:
# vxsnap [-g diskgroup] restore volume|volume_set \
source=snapvolume|snapvolume_set \
[[volume2|volume_set2 source=snapvolume2|snapvolume_set2]...] \
[destroy=yes|no] [syncing=yes|no] [nmirror=number]
For a full-sized instant snapshot, some or all of its plexes may be reattached to the parent
volume or to a specified source volume in the snapshot hierarchy above the snapshot
volume. If destroy=yes is specified, all the plexes of the full-sized instant snapshot are
reattached and the snapshot volume is removed.