ONTAP 9.13.1 commands

snapmirror delete

Delete a SnapMirror relationship

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The snapmirror delete command removes the SnapMirror relationship between a source endpoint and a destination endpoint. The destination endpoint can be a Vserver, a volume, an Application Consistency Group, or a non-Data ONTAP endpoint. The Vservers, volumes, FlexVol volumes of the Consistency Group and non-Data ONTAP destinations are not destroyed and Snapshot copies on the volumes are not removed.

For relationships with SolidFire endpoints, the SnapMirror source commands snapmirror release and snapmirror list-destinations are not supported. Therefore, Snapshot copies that are locked by SnapMirror on the source container cannot be cleaned up using the snapmirror release command. If the source container is a Data ONTAP volume, in order to reclaim space captured in the base Snapshot copy on the volume, issue a snapshot delete command specifying the -ignore-owners parameter in diag privilege level. To reclaim space captured in a Snapshot copy locked by SnapMirror on a SolidFire system, refer to SolidFire documentation.

The snapmirror delete command fails if a SnapMirror transfer for the SnapMirror relationship is in progress for relationships with "Relationship Capability" of "Pre 8.2" . For relationships with "8.2 and above" capability the delete will succeed even if a transfer is in progress and the transfer will ultimately stop.

A set of load-sharing mirrors can contain multiple destination volumes, each destination volume having a separate SnapMirror relationship with the common source volume. When used on one of the SnapMirror relationships from the set of load-sharing mirrors, the snapmirror delete command deletes the specified SnapMirror relationship from the set of load-sharing mirrors.

The snapmirror delete command preserves the read-write or read-only attributes of the volumes of a SnapMirror relationship after the relationship is deleted. Therefore, a read-write volume that was the source of a SnapMirror relationship retains its read-write attributes, and a data protection volume or a load-sharing volume that was a destination of a SnapMirror relationship retains its read-only attributes. Similarly, the subtype attribute of source and destination Vservers is not modified when a Vserver SnapMirror relationship is deleted.

When a SnapMirror relationship from a set of load-sharing mirrors is deleted, the destination volume becomes a data protection volume and retains the read-only attributes of a data protection volume.

For relationships with a policy of type strict-sync-mirror or sync-mirror , the relationship must be Quiesced before it can be deleted.

This command is supported for SnapMirror relationships with the field "Relationship Capability" showing as either "8.2 and above" or "Pre 8.2" in the output of the snapmirror show command.

For relationships with "Relationship Capability" of "8.2 and above" , the snapmirror delete command must be used from the destination Vserver or cluster. The SnapMirror relationship information is deleted from the destination Vserver, but no cleanup or deletion is performed on the source Vserver. The snapmirror release command must be issued on the source Vserver to delete the source relationship information.

For relationships with "Relationship Capability" of "Pre 8.2" , you can use this command from the source or from the destination cluster. When used from the destination cluster, the SnapMirror relationship information on the source and destination clusters is deleted. When used from the source cluster, only the SnapMirror relationship information on the source cluster is deleted.

Parameters

{ [-S, -source-path {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>|<[vserver:]/cg/[app-cgname]>}] - Source Path

This parameter specifies the source endpoint of the SnapMirror relationship in one of four path formats. The normal format includes the names of the Vserver (vserver) and/or the volume (volume). To support relationships with "Relationship Capability" of "Pre 8.2" , a format which also includes the name of the cluster (cluster) is provided. The "Pre 8.2" format cannot be used when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" . For SnapMirror relationships with an AltaVault source, the source endpoint is specified in the form hostip:/share/share-name . For SnapMirror relationships with a SolidFire source, the source endpoint is specified in the form hostip:/lun/name .

| [-source-cluster <Cluster name>] - Source Cluster

Specifies the source cluster of the SnapMirror relationship. If this parameter is specified, the -source-vserver and -source-volume parameters must also be specified. This parameter is only applicable for relationships with "Relationship Capability" of "Pre 8.2" . This parameter cannot be specified when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" .

[-source-vserver <vserver name>] - Source Vserver

Specifies the source Vserver of the SnapMirror relationship. For relationships with volumes as endpoints, if this parameter is specified, parameters -source-volume and for relationships with "Relationship Capability" of "Pre 8.2" , -source-cluster must also be specified. This parameter is not supported for relationships with non-Data ONTAP source endpoints.

[-source-volume <volume name>] - Source Volume }

Specifies the source volume of the SnapMirror relationship. If this parameter is specified, parameters -source-vserver and for relationships with "Relationship Capability" of "Pre 8.2" , -source-cluster must also be specified. This parameter is not supported for relationships with non-Data ONTAP source endpoints.

{ -destination-path {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>|<[vserver:]/cg/[app-cgname]>} - Destination Path

This parameter specifies the destination endpoint of the SnapMirror relationship in one of four path formats. The normal format includes the names of the Vserver (vserver) and/or volume (volume). To support relationships with "Relationship Capability" of "Pre 8.2" , a format which also includes the name of the cluster (cluster) is provided. The "Pre 8.2" format cannot be used when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" . For SnapMirror relationships with AltaVault destinations, the destination endpoint is specified in the form hostip:/share/share-name . For relationships with SolidFire destinations, the destination endpoint is specified in the form hostip:/lun/name .

| [-destination-cluster <Cluster name>] - Destination Cluster

Specifies the destination cluster of the SnapMirror relationship. If this parameter is specified, parameters -destination-vserver and -destination-volume must also be specified. This parameter is only applicable for relationships with "Relationship Capability" of "Pre 8.2" . This parameter cannot be specified when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" .

-destination-vserver <vserver name> - Destination Vserver

Specifies the destination Vserver of the SnapMirror relationship. For relationships with volumes as endpoints, if this parameter is specified, parameters -destination-volume and for relationships with "Relationship Capability" of "Pre 8.2" , -destination-cluster must also be specified. This parameter is not supported for relationships with non-Data ONTAP destination endpoints.

-destination-volume <volume name> - Destination Volume }

Specifies the destination volume of the SnapMirror relationship. If this parameter is specified, parameters -destination-vserver and for relationships with "Relationship Capability" of "Pre 8.2" , -destination-cluster must also be specified. This parameter is not supported for relationships with non-Data ONTAP destination endpoints.

[-f, -force <true>] - Force

If specified, the delete proceeds even if it cannot clean up all artifacts of the relationship.

[-w, -foreground <true>] - Foreground Process

This specifies whether the operation runs as a foreground process. If this parameter is specified, the default setting is true (the operation runs in the foreground). When set to true , the command will not return until the process completes. This parameter is only applicable to relationships with "Relationship Capability" of "Pre 8.2" .

Examples

To delete the SnapMirror relationship with the destination endpoint vs2.example.com:dept_eng_dp_mirror4 , type the following command:

vs2.example.com::> snapmirror delete -destination-path
       vs2.example.com:dept_eng_dp_mirror4

For relationships with "Relationship Capability" of "Pre 8.2" , to delete the SnapMirror relationship with the destination endpoint cluster2://vs2.example.com/dept_eng_dp_mirror4 , type the following command:

cluster2::> snapmirror delete -destination-path
         cluster2://vs2.example.com/dept_eng_dp_mirror4

To delete the SnapMirror relationship with destination endpoint dvs1.example.com: , type the following command:

cluster2::> snapmirror delete -destination-path
   dvs1.example.com:

To delete the SnapMirror Business Continuity (SM-BC) relationship with the destination Consistency Group cg_dst in Vserver vs2.example.com , type the following command from the destination cluster:

destination::> snapmirror delete -destination-path
        vs2.example.com:/cg/cg_dst

To delete the Application Consistency Group SnapMirror relationship with the destination Application Consistency Group app_cg_dst in Vserver vs2.example.com and all item mappings, type the following command:

vs2.example.com::> snapmirror delete -destination-path
            vs2.example.com:/cg/app_cg_dst
Top of Page