Table of ContentsLibraryView 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.

Considerations

You might want to resynchronize a source and a destination volume or qtree when:
  • You are changing the current source to a different volume or qtree.
  • You make a destination volume writable for application testing and then want to make it a SnapMirror destination again.
  • You need to recover from a disaster that disabled the source.
  • You want to reverse the functions of the source and the destination.
Note: When you perform resync for the destination storage 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 would be done if the snapmirror resync command were run. You can use this option to find whether you have a Snapshot copy on the source and on the destination that can be used as the newest common Snapshot copy (base Snapshot copy) so that you can resync 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.

    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 will be used as the base for resynchronization, and generates a list of Snapshot copies on the destination volume that:

    • Are newer than the base Snapshot copy and will be deleted.
    • 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, take one of the following actions.
    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

    Volume example

    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

    Qtree example

    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?