340

Administering volume snapshots

Creating instant snapshots

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 [-gdiskgroup] restore volumevolume_set \ source=snapvolumesnapvolume_set \

[[volume2volume_set2 source=snapvolume2snapvolume_set2]...]\ [destroy=yesno] [syncing=yesno] [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.

The following example demonstrates how to restore the volume, myvol, from the space-optimized snapshot, snap3myvol.

#vxsnap -g mydg restore myvol source=snap3myvol

Dissociating an instant snapshot

The following command breaks the association between a full-sized instant snapshot volume, snapvol, and its parent volume, so that the snapshot may be used as an independent volume:

# vxsnap [-f][-gdiskgroup] dis snapvolumesnapvolume_set

This operation fails if the snapshot, snapvol, has a snapshot hierarchy below it that contains unsynchronized snapshots. If this happens, the dependent snapshots must be fully synchronized from snapvol. When no dependent

Page 339
Image 339
HP Veritas Volume Manager 5.0 -UX 11i v3 Restoring a volume from an instant snapshot, Dissociating an instant snapshot