Performing online data verification

The space-optimized snapshots that are created using the vxrvg snapshot command can be used to verify whether the data on the Primary and Secondary RVG volumes is the same.

The major advantage of this feature over the vradmin -verify syncrvg command is that you do not need to stop the replication. The verification can be done even while the replication is in progress because the point-in-time snapshots, and not the volumes, are compared. This feature is very useful if you want to check the integrity of the data volumes on the Secondary when replication is in progress.

The vradmin verifydata command creates the space-optimized snapshots on the Primary and the Secondary before it proceeds with performing online data verification. The vradmin verifydata command also ensures that the snapshots are taken only after the replication has been paused using the vxibc freeze command. As a result there may be a momentary pause in the replication. It is necessary to freeze the writes so that the snapshots can be taken at an identical point in replication time, on each of the required hosts.

The vradmin verifydata then verifies the data between the remote and local hosts by comparing the space-optimized snapshots.

The vradmin verifydata command performs the following tasks:

By default, the vradmin verifydata command destroys the snapshot volume and the cache object after the data verification has proceeded successfully. However, if you want to preserve the snapshot volumes then you must use the vradmin verifydata command with the -k snap option. If you want to preserve the cache object then use the vradmin verifydata command with the -k cache option. The same cache object can then be reused when creating future snapshots. You cannot use the -k option if you have used the cachesize option, as it is an invalid combination and the command fails with an error message. Note that when specifying the -k option you must specify either the cache or the snap argument with it.

Note:

When the -k snap option is specified the cache object is also preserved along with the snapshot since the snapshot cannot exist without the cache object.

VVR also provides you with sample scripts that can be used to freeze the replication and then take instant space-optimized snapshots.

See Sample scripts.

To perform online data verification

  1. Prepare the volumes that need to be included in the snapshot.

    See Preparing the volumes.

  2. Create the required cache object within the same disk group as the data volume.

    See Preparing the RVG volumes for snapshot operation.

  3. To perform online data verification, use the command:

    vradmin [-g diskgroup] [-k {cache|snap}] verifydata rvg_name \
          sechost {cache=cacheobj | cachesize=size}

    The attribute sechost specifies the name of the Secondary host.

    The cache attribute specifies a name for the precreated cache object, on which the snapshots for the volumes in the specified RVG will be created. The cachesize attribute specifies a default size for the cache object with respect to the source volume.

    You must specify only one of these attributes at one time for the command to create a cache object for each snapshot.