Table of ContentsView in Frames

Resynchronizing a SnapMirror relationship

You can use the snapmirror resync command to restore or redefine a SnapMirror source or destination relationship that was broken with the snapmirror break command.

About this task

You might want to resynchronize a source and a destination volume or qtree under the following circumstances:
Note: When you perform resynchronization for the destination system, the contents on the destination are overwritten by the contents on the source.

Steps

  1. From the destination system, enter the following command:snapmirror resync [options] [dest_system:]{dest_volume | /vol/qtree_path}
    options can be any of the following:
    • -n does not execute the resynchronization, but displays what is done if the snapmirror resync command is run. You can use this option to find whether you have a Snapshot copy on the source and the destination that can be used as the newest common Snapshot copy (base Snapshot copy) so that you can resynchronize a specific SnapMirror relationship.
    • -f forces the operation to proceed without prompting you for confirmation.
    • -k n sets the maximum transfer speed to n kilobytes per second. This option has the same effect as the kbs argument in the /etc/snapmirror.conf file.
    • -S [source_system:]{source_volume | qtree_path} specifies the system and volume or qtree you want to use as the source for resynchronization.

      The source specified by the -S option must match a source entry in the /etc/snapmirror.conf file. If entries exist but the source does not match, the operation displays an error message and terminates. If there is no entry for the specified source, the command runs.

      Note: If the -S option is not set, the source must be specified in the /etc/snapmirror.conf file. If it is not specified, the operation displays an error message and terminates.
    • -c snapshot_name creates a Snapshot copy (with the name snapshot_name) of a qtree on the destination after the resynchronization transfer completes (so that it does not compete with any ongoing updates).

      SnapMirror does not lock or delete this Snapshot copy.

      Note:
      • snapshot_name cannot be minutely.x, hourly.x, nightly.x, or weekly.x, because these names are reserved for scheduled Snapshot copies.
      • This option is valid only for a qtree SnapMirror replication.
    • -s snapshot_name specifies an existing Snapshot copy of a source qtree to be transferred. This prevents the normal action of the source creating a Snapshot copy to transfer. SnapMirror does not lock or delete this Snapshot copy.
      Note: This option is valid only for a qtree SnapMirror replication.

    dest_system is the name of the destination system.

    dest_volume or /vol/qtree_path is the destination volume or qtree. If it is a scheduled destination as specified in the /etc/snapmirror.conf file, that source volume or qtree is considered to be the source. If the destination volume or qtree specified is not in a scheduled relationship, then the -S option must be used to provide a source.

    SnapMirror identifies the newest common Snapshot copy, which is to be used as the base for resynchronization, and generates a list of Snapshot copies on the destination volume that meet the following criteria:
    • The Snapshot copies are newer than the base Snapshot copy and are deleted.
    • The Snapshot copies are older than the base Snapshot copy and have already been deleted from the source.
    Note: For qtree resynchronization, only the common Snapshot copy is displayed.

    SnapMirror then prompts you to choose whether to continue.

  2. As required, choose one of the actions from the following table:
    If... Then...
    You want to:
    • Reestablish the SnapMirror pair
    • Delete the listed Snapshot copies on the destination volume (if you are resynchronizing volumes)
    Type y at the prompt.
    Result: SnapMirror:
    • Deletes the listed Snapshot copies on the destination volume (if you are resynchronizing volumes).
    • Makes the destination read-only.
    • Initiates an update of the destination.
    You do not want to lose the data in a Snapshot copy that was created after the common Snapshot copy on the destination, but you want to resynchronize the two volumes or qtrees after the data is saved
    • Type n at the prompt.
    • Manually copy the data you want to save to the source or other volume.
    • Return to Step 1 to rerun the snapmirror resync command.
    You do not want to reestablish the SnapMirror relationship Type n at the prompt.

    Result: SnapMirror terminates the command.

    Example
    SnapMirror resynchronization for volumes
    systemB> snapmirror resync systemB:vol2
    
    The resync base snapshot will be vol2(0001234567)_d.4
    These newer snapshots will be deleted from the destination:
    hourly.0
    hourly.1
    These older snapshots have already been deleted from the source and will be deleted from the destination:
    vol2(0001234567)_d.3
    Are you sure you want to resync the volume?
    Example
    SnapMirror resynchronization for qtrees
    systemB> snapmirror resync -S systemA:/vol/vol2/qtreeBob systemB:/vol/vol3/qtreeBak
    
    The resync base snapshot will be vol2(0001234567)_d.4
    Data could be lost as a result of this operation.
    Are you sure you want to resync the volume?