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.
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.
For relationships with "9.4 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.
For relationships with "Relationship Capability" of "9.4 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>|<[vserver:]/cg/[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).
- [-source-vserver <vserver name>] - Source Vserver
- Specifies the source Vserver of the SnapMirror relationship. 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. 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/[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).
- -destination-vserver <vserver name> - Destination Vserver
- Specifies the destination Vserver of the SnapMirror relationship. 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. This parameter is not supported for relationships with non-Data ONTAP destination endpoints.
- [-force | -f [true]] - Force
- If specified, the delete proceeds even if it cannot clean up all artifacts of the relationship.
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