Skip to main content

Ensure a common snapshot in a mirror-vault deployment with ONTAP

Contributors netapp-aaron-holt netapp-dbagwell netapp-aherbin

You can use the snapmirror snapshot-owner create command to preserve a labeled snapshot on the secondary in a mirror-vault deployment. Doing so ensures that a common snapshot exists for the update of the vault relationship.

About this task

If you use a combination mirror-vault fan-out or cascade deployment, you should keep in mind that updates will fail if a common snapshot does not exist on the source and destination volumes.

This is never an issue for the mirror relationship in a mirror-vault fan-out or cascade deployment, since SnapMirror always creates a snapshot of the source volume before it performs the update.

It might be an issue for the vault relationship, however, because SnapMirror does not create a snapshot of the source volume when it updates a vault relationship. You need to use the snapmirror snapshot-owner create to ensure that there is at least one common snapshot on both the source and destination of the vault relationship.

Steps
  1. On the source volume, assign an owner to the labeled snapshot you want to preserve:

    snapmirror snapshot-owner create -vserver <SVM> -volume <volume> -snapshot <snapshot> -owner <owner>

    The following example assigns ApplicationA as the owner of the snap1 snapshot:

    clust1::> snapmirror snapshot-owner create -vserver vs1 -volume vol1
    -snapshot snap1 -owner ApplicationA
  2. Update the mirror relationship, as described in Updating a replication relationship manually.

    Alternatively, you can wait for the scheduled update of the mirror relationship.

  3. Transfer the labeled snapshot to the vault destination:

    snapmirror update -source-path <SVM:volume>|<cluster://SVM/volume>, …​ -destination-path <SVM:volume>|<cluster://SVM/volume>, …​ -source-snapshot snapshot

    Learn more about snapmirror update in the ONTAP command reference.

    The following example transfers the snap1 snapshot
    clust1::> snapmirror update -vserver vs1 -volume vol1
    -source-snapshot snap1

    The labeled snapshot will be preserved when the vault relationship is updated.

  4. On the source volume, remove the owner from the labeled snapshot:

    snapmirror snapshot-owner delete -vserver SVM -volume volume -snapshot snapshot -owner owner

    The following examples removes ApplicationA as the owner of the snap1 snapshot:

    clust1::> snapmirror snapshot-owner delete -vserver vs1 -volume vol1
    -snapshot snap1 -owner ApplicationA