VERITAS Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide
Creating Instant Snapshots
88 VERITAS Storage Foundation ISP Administrator’s Guide
Caution This operation requires the specification of the -f (force) option as it violates the intent
of the source volume. After the reattach operation completes, it may not be possible
to perform other operations such as resizing the volume or transforming the layout of
the volume. To restore the intent of the volume and allow such operations to be
performed, use the vxplex dis plex command to dissociate the attached snapshot
plexes.
By default, all the plexes are attached, which results in the removal of the snapshot. If required, the
number of plexes to be attached 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.
Only the plexes of a snapshot volume that was set up using ISP may be attached.
If the snapshot volume and the source volume lie in different storage pools, the underlying
disks of the snapshot volume are moved to the source volume’s storage pool. However, if
other objects in the snapshot volume’s storage pool are also configured on these disks, the
reattach command fails.
For example the following command attaches one plex from the snapshot volume, snapmyvol, to
the volume, myvol:
# vxsnap -g mydg -f reattach snapmyvol source=myvol nmirror=1
Restoring a Volume from an Instant Snapshot (vxsnap restore)
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.
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.