Veritas Storage Foundation Intelligent Storage Provisioning 5.0 AdministratorÆs Guide, HP-UX 11i v3, First Edition, May 2008

113Administering instant snapshots
Creating instant snapshots
To reattach a linked break-off snapshot volume, use the following form of the
vxsnap reattach command:
# vxsnap [-g
snapdiskgroup
] reattach
snapvolume
|
snapvolume_set
\
source=
volume
|
volume_set
[sourcedg=
diskgroup
]
The sourcedg attribute must be used to specify the data volume’s disk group if
this is different from the snapshot volume’s disk group, snapdiskgroup.
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, it 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
On occasion, it may be desirable to reinstate the contents of a volume from a
backup or modified replica within a snapshot volume. The following command
may be used to restore a volume:
# vxsnap [-g
diskgroup
] restore [nmirrors=
number
]
vol
\
[source=
snapvol
] [destroy=yes|no]
For a full 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 snapshot
are reattached and the snapshot volume is removed.
For a space-optimized instant snapshot, the cached data is used to restore the
contents of the specified volume. The snapshot itself remains unchanged by the
operation.