Veritas Volume Manager 5.0 Administrator's Guide (September 2006)
329Administering volume snapshots
Creating instant snapshots
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 and
region sizes are compatible.
For example the following command reattaches the snapshot volume, prepsnap, in the
disk group, snapdg, to the volume, myvol, in the disk group, mydg:
# vxsnap -g snapdg reattach prepsnap source=myvol sourcedg=mydg
After resynchronization of the snapshot volume is complete, the link is placed in the
ACTIVE state. You can use the
vxsnap snapwait command (but not vxsnap
syncwait) to wait for the resynchronization of the reattached volume to complete, as
shown here:
# vxsnap -g snapdg snapwait myvol mirvol=prepsnap
Restoring a volume from an instant snapshot
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.
For a space-optimized instant snapshot, the cached data is used to recreate the contents of
the specified volume. The space-optimized instant snapshot remains unchanged by the
restore operation.
Note: For this operation to succeed, the volume that is being restored and the snapshot
volume must not be open to any application. For example, any file systems that are
configured on either volume must first be unmounted.
It is not possible to restore a volume from an unrelated volume.
The destroy and nmirror attributes are not supported for space-optimized instant
snapshots.