Creating and managing full-sized instant snapshots

Full-sized instant snapshots are not suitable for write-intensive volumes (such as for database redo logs) because the copy-on-write mechanism may degrade the performance of the volume.

For full-sized instant snapshots, you must prepare a volume that is to be used as the snapshot volume. This must be the same size as the volume for which the snapshot is being created, and it must also have the same region size.

The attributes for a snapshot are specified as a tuple to the vxsnap make command. This command accepts multiple tuples. One tuple is required for each snapshot that is being created. Each element of a tuple is separated from the next by a slash character (/). Tuples are separated by white space.

To create and manage a full-sized instant snapshot

  1. To create a full-sized instant snapshot, use the following form of the vxsnap make command:
    # vxsnap [-g diskgroup] make source=volume/snapvol=snapvol\
    [/snapdg=snapdiskgroup] [/syncing=off]

    The command specifies the volume, snapvol, that you prepared earlier.

    For example, to use the prepared volume, snap1myvol, as the snapshot for the volume, myvol, in the disk group, mydg, use the following command:

    # vxsnap -g mydg make source=myvol/snapvol=snap1myvol

    For full-sized instant snapshots that are created from an empty volume, background synchronization is enabled by default (equivalent to specifying the syncing=on attribute). To move a snapshot into a separate disk group, or to turn it into an independent volume, you must wait for its contents to be synchronized with those of its parent volume.

    You can use the vxsnap syncwait command to wait for the synchronization of the snapshot volume to be completed, as shown here:

    # vxsnap [-g diskgroup] syncwait snapvol

    For example, you would use the following command to wait for synchronization to finish on the snapshot volume, snap2myvol:

    # vxsnap -g mydg syncwait snap2myvol

    This command exits (with a return code of zero) when synchronization of the snapshot volume is complete. The snapshot volume may then be moved to another disk group or turned into an independent volume.

    See Controlling instant snapshot synchronization.

    If required, you can use the following command to test if the synchronization of a volume is complete:

    # vxprint [-g diskgroup] -F%incomplete snapvol

    This command returns the value off if synchronization of the volume, snapvol, is complete; otherwise, it returns the value on.

    You can also use the vxsnap print command to check on the progress of synchronization.

    See Displaying snapshot information.

    If you do not want to move the snapshot into a separate disk group, or to turn it into an independent volume, specify the syncing=off attribute. This avoids unnecessary system overhead. For example, to turn off synchronization when creating the snapshot of the volume, myvol, you would use the following form of the vxsnap make command:

    # vxsnap -g mydg make source=myvol/snapvol=snap1myvol\
    /syncing=off
  2. Clean the temporary volume's contents using an appropriate utility such as fsck for non-VxVM file systems and log replay for databases. Because VxVM calls VxFS and places VxFS file systems in a constant state immediately before taking a snapshot, it is not usually necessary to run fsck on a VxFS file system on the temporary volume. If a VxFS file system contains a database, it will still be necessary to perform database log replay.
  3. To backup the data in the snapshot, use an appropriate utility or operating system command to copy the contents of the snapshot to tape, or to some other backup medium.
  4. You now have the following options:

    • Refresh the contents of the snapshot. This creates a new point-in-time image of the original volume ready for another backup. If synchronization was already in progress on the snapshot, this operation may result in large portions of the snapshot having to be resynchronized.

    • Reattach some or all of the plexes of the snapshot volume with the original volume.

    • Restore the contents of the original volume from the snapshot volume. You can choose whether none, a subset, or all of the plexes of the snapshot volume are returned to the original volume as a result of the operation.

    • Dissociate the snapshot volume entirely from the original volume. This may be useful if you want to use the copy for other purposes such as testing or report generation. If desired, you can delete the dissociated volume.

    • If the snapshot is part of a snapshot hierarchy, you can also choose to split this hierarchy from its parent volumes.

More Information

Creating a volume for use as a full-sized instant or linked break-off snapshot

Refreshing an instant space-optimized snapshot

Reattaching an instant full-sized or plex break-off snapshot

Restoring a volume from an instant space-optimized snapshot

Dissociating an instant snapshot

Splitting an instant snapshot hierarchy