snapmirror delete
Delete a SnapMirror relationship
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, or a non-Data ONTAP endpoint. The Vservers, volumes and non-Data ONTAP destinations are not destroyed and Snapshot copies on the volumes are not removed.
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.
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.
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.
Parameters
- { [-source-path | -S {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>}] - 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).
- | [-source-cluster <Cluster name>] - Source Cluster
- This parameter is not supported in ONTAP 9.4 and above.
- [-source-vserver <vserver name>] - Source Vserver
- This parameter is not supported in ONTAP 9.4 and above.
- [-source-volume <volume name>]} - Source Volume
- This parameter is not supported in ONTAP 9.4 and above.
- { -destination-path {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>} - 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).
- | [-destination-cluster <Cluster name>] - Destination Cluster
- This parameter is not supported in ONTAP 9.4 and above.
- -destination-vserver <vserver name> - Destination Vserver
- This parameter is not supported in ONTAP 9.4 and above.
- -destination-volume <volume name>} - Destination Volume
- This parameter is not supported in ONTAP 9.4 and above.
- [-force | -f [true]] - Force
- If specified, the delete proceeds even if it cannot clean up all artifacts of the relationship.
- [-foreground | -w [true]] - Foreground Process
- This parameter is not supported in ONTAP 9.4 and above.
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
To delete the SnapMirror relationship with destination endpoint dvs1.example.com:, type the following command:
cluster2::> snapmirror delete -destination-path
dvs1.example.com:
Under PVR control to delete the synchronous SnapMirror Consistency Group relationship with the destination Consistency Group 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/cg_dst
Under PVR control to delete the item mapping between lun3 on volume srcvol and lun3 on volume dstvol in the SnapMirror synchronous Consistency Group relationship with the destination Consistency Group cg_dst in Vserver vs2.example.com, type the following command:
vs2.example.com::> snapmirror delete -destination-path
vs2.example.com:/cg/cg_dst
-cg-item-mappings /vol/srcvol/lun3:@/vol/dstvol/lun3