Skip to main content
A newer release of this product is available.

Update a SnapMirror relationship

Contributors

PATCH /snapmirror/relationships/{uuid}

Updates a SnapMirror relationship. This API is used to initiate SnapMirror operations such as "initialize", "resync", "break", "quiesce", and "resume" by specifying the appropriate value for the "state" field. It is also used to modify the SnapMirror policy associated with the specified relationship.

  • snapmirror modify

  • snapmirror initialize

  • snapmirror resync

  • snapmirror break

  • snapmirror quiesce

  • snapmirror resume

Examples

The following examples show how to perform the SnapMirror "resync", "initialize", "resume", "quiesce", and "break" operations.

Performing a SnapMirror "resync"

 PATCH "/api/snapmirror/relationships/98bb2608-fc60-11e8-aa13-005056a707ff/" '{"state":"snapmirrored"}'

Performing a SnapMirror "initialize"

 PATCH "/api/snapmirror/relationships/98bb2608-fc60-11e8-aa13-005056a707ff/" '{"state":"snapmirrored"}'

Performing a SnapMirror "resume"

 PATCH "/api/snapmirror/relationships/98bb2608-fc60-11e8-aa13-005056a707ff/" '{"state":"snapmirrored"}'

Performing a SnapMirror "quiesce"

 PATCH "/api/snapmirror/relationships/98bb2608-fc60-11e8-aa13-005056a707ff" '{"state":"paused"}'

Performing a SnapMirror "break"

 PATCH "/api/snapmirror/relationships/98bb2608-fc60-11e8-aa13-005056a707ff" '{"state":"broken_off"}'

Updating an associated SnapMirror policy

 PATCH "/api/snapmirror/relationships/9e922e65-1818-11e9-8b22-005056bbee73/" '{"policy": { "name" : "MirrorAndVaultDiscardNetwork"}}'

Parameters

Name Type In Required Description

uuid

string

path

True

Relationship UUID

Request Body

Name Type Description

destination

snapmirror_endpoint

Endpoint of a SnapMirror relationship.

exported_snapshot

string

Snapshot copy exported to clients on destination.

healthy

boolean

Is the relationship healthy?

lag_time

string

Time since the exported Snapshot copy was created.

policy

policy

Basic policy information of the relationship.

preserve

boolean

Set to true on resync to preserve Snapshot copies on the destination that are newer than the latest common Snapshot copy. This field is applicable only for relationships with FlexGroup or FlexVol endpoints and when the PATCH state is "snapmirrored".

quick_resync

boolean

Set to true to reduce resync time by not preserving storage efficiency. This field is applicable only for relationships with FlexVol endpoints and when the PATCH state is "snapmirrored".

recover_after_break

boolean

Set to true to recover from a failed SnapMirror break operation on a FlexGroup relationship. This restores all destination FlexGroup constituents to the latest Snapshot copy, and any writes to the read-write constituents are lost. This field is applicable only for SnapMirror relationships with FlexGroup endpoints and when the PATCH state is "broken_off".

restore

boolean

Set to true to create a relationship for restore. To trigger restore-transfer, use transfers POST on the restore relationship.

restore_to_snapshot

string

Specifies the Snapshot copy to restore to on the destination after a break operation. This field is applicable only for SnapMirror relationships with FlexVol endpoints and when the PATCH state is "broken_off".

source

snapmirror_endpoint

Endpoint of a SnapMirror relationship.

state

string

State of the relationship. To initialize the relationship, PATCH the state to "snapmirrored". To break the relationship, PATCH the state to "broken_off". To resync the broken relationship, PATCH the state to "snapmirrored" for relationships with async policy type or "in_sync" for relationships with sync policy type. To pause the relationship, suspending further transfers, PATCH the state to "paused". To resume transfers for a paused relationship, PATCH the state to "snapmirrored" or "in_sync". The entries "in_sync", "out_of_sync", and "synchronizing" are only applicable to relationships of the sync policy type. A PATCH call on the state change only triggers the transition to the specified state. You must poll on the "state", "healthy" and "unhealthy_reason" fields using GET to determine if the transition is successful.

transfer

transfer

Basic information on the current transfer.

unhealthy_reason

array[snapmirror_error]

Reason the relationship is not healthy. It is a concatenation of up to four levels of error messages.

uuid

string

Example request
{
  "destination": {
    "path": "svm1:volume1",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    }
  },
  "exported_snapshot": "string",
  "lag_time": "PT8H35M42S",
  "policy": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "MirrorAndVault",
    "type": "async",
    "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
  },
  "source": {
    "path": "svm1:volume1",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    }
  },
  "state": "broken_off",
  "transfer": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "state": "aborted",
    "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
  },
  "unhealthy_reason": [
    {
      "code": "6621444",
      "message": "Failed to complete update operation on one or more item relationships.",
      "parameters": []
    },
    {
      "code": "6621445",
      "message": "Group Update failed",
      "parameters": []
    }
  ],
  "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
}

Response

Status: 202, Accepted
Name Type Description

job

job_link

Example response
{
  "job": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "uuid": "string"
  }
}

Error

Status: Default

ONTAP Error Response codes

Error code Description

13303825

Could not retrieve information for the SnapMirror policy type

13303817

Unknown value for the SnapMirror state

13303829

Invalid state

13303830

Transient state

13303831

Invalid state for async SnapMirror relationship

13303834

Given input valid only for FlexGroup SnapMirror relationship

13303835

Given flag is valid only when PATCH state is broken_off

13303836

Given flag is valid only when PATCH state is snapmirrored or in_sync

13303818

Invalid state transition requested

13303828

Given state change is not possible for SVM SnapMirror relationship

13303833

Requested state change is not possible

13303832

SnapMirror relationship is already initialized

13303824

Quiescing the SnapMirror relationship has failed

13303826

Required environment variables are not set

13303827

Internal Error

13303823

Quiesce operation timed out

13303821

Invalid SnapMirror policy name/UUID

13303819

Could not retrieve SnapMirror policy information

13303851

Cannot modify attributes of SnapMirror restore relationship

13303816

Could not retrieve state or status values

13303837

Given flags are valid only if SnapMirror state change is requested

6619546

Destination must be a dp volume

13303808

Transition to broken_off state failed

13303809

Transition to paused state failed

13303810

Transition to snapmirrored state failed

13303811

Transition from paused state failed

13303820

SnapMirror policy was successfully updated, state transition failed

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": {
      "code": "string",
      "message": "string"
    },
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

snapmirror_endpoint

Endpoint of a SnapMirror relationship.

Name Type Description

path

string

ONTAP FlexVol/FlexGroup - svm1:volume1 ONTAP SVM - svm1:

  • example: svm1:volume1

  • readCreate: 1

svm

svm

policy

Basic policy information of the relationship.

Name Type Description

_links

_links

name

string

type

string

uuid

string

transfer

Basic information on the current transfer.

Name Type Description

_links

_links

bytes_transferred

integer

Bytes transferred.

state

string

uuid

string

snapmirror_error

SnapMirror error

Name Type Description

code

integer

Error code

message

string

Error message

parameters

array[string]

Parameters for the error message

snapmirror_relationship

SnapMirror relationship information

Name Type Description

destination

snapmirror_endpoint

Endpoint of a SnapMirror relationship.

exported_snapshot

string

Snapshot copy exported to clients on destination.

healthy

boolean

Is the relationship healthy?

lag_time

string

Time since the exported Snapshot copy was created.

policy

policy

Basic policy information of the relationship.

preserve

boolean

Set to true on resync to preserve Snapshot copies on the destination that are newer than the latest common Snapshot copy. This field is applicable only for relationships with FlexGroup or FlexVol endpoints and when the PATCH state is "snapmirrored".

quick_resync

boolean

Set to true to reduce resync time by not preserving storage efficiency. This field is applicable only for relationships with FlexVol endpoints and when the PATCH state is "snapmirrored".

recover_after_break

boolean

Set to true to recover from a failed SnapMirror break operation on a FlexGroup relationship. This restores all destination FlexGroup constituents to the latest Snapshot copy, and any writes to the read-write constituents are lost. This field is applicable only for SnapMirror relationships with FlexGroup endpoints and when the PATCH state is "broken_off".

restore

boolean

Set to true to create a relationship for restore. To trigger restore-transfer, use transfers POST on the restore relationship.

restore_to_snapshot

string

Specifies the Snapshot copy to restore to on the destination after a break operation. This field is applicable only for SnapMirror relationships with FlexVol endpoints and when the PATCH state is "broken_off".

source

snapmirror_endpoint

Endpoint of a SnapMirror relationship.

state

string

State of the relationship. To initialize the relationship, PATCH the state to "snapmirrored". To break the relationship, PATCH the state to "broken_off". To resync the broken relationship, PATCH the state to "snapmirrored" for relationships with async policy type or "in_sync" for relationships with sync policy type. To pause the relationship, suspending further transfers, PATCH the state to "paused". To resume transfers for a paused relationship, PATCH the state to "snapmirrored" or "in_sync". The entries "in_sync", "out_of_sync", and "synchronizing" are only applicable to relationships of the sync policy type. A PATCH call on the state change only triggers the transition to the specified state. You must poll on the "state", "healthy" and "unhealthy_reason" fields using GET to determine if the transition is successful.

transfer

transfer

Basic information on the current transfer.

unhealthy_reason

array[snapmirror_error]

Reason the relationship is not healthy. It is a concatenation of up to four levels of error messages.

uuid

string

Name Type Description

_links

_links

uuid

string

The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.