Microsoft Virtualization Discussions

Unable to remove snapmirror relationship

JLundfelt
6,736 Views

I have a snapmirror relationship, setup on a single filer as a QSM to move data between 32bit  and 64 bit aggregates-

Source                           Destination                      Status     State            LagTimeTS
------                           -----------                      ------     -----            ---------
irv-gdc-san1a:/vol/AI/EDW        irv-gdc-san1a:/vol/AI_1/EDW      idle       broken-off        01:59:11

I have ran Invoke-NaSnapmirrorQuiesce, and  Invoke-NaSnapmirrorBreak, but when I run-

Remove-NaSnapmirror -destination irv-gdc-san1a:/vol/AI_1/EDW -Source irv-gdc-san1a:/vol/AI/EDW -SourceController irv-gdc-san1a

I get-

Removing snapmirror relationship

Are you sure you wish to remove the snapmirror relationship with source irv-gdc-san1a:/vol/AI/EDW and destination irv-gdc-san1a:/vol/AI_1/EDW?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

Remove-NaSnapmirror : Incorrect credentials for irv-gdc-san1a.

At line:1 char:20

Any ideas on what I am missing?

Thanks,

Jon

5 REPLIES 5

cknight
6,736 Views

Remove-NaSnapmirror must communicate with both source and destination controllers to fully remove the SnapMirror relationship.  The argument -SourceController is of type NaController, as returned by Connect-NaController.  The example in the help shows one of several ways you can do this:

C:\PS> Remove-NaSnapmirror -Destination benson:dunn_vol2_mirror -Source dunn:vol2 -SourceController (Connect-NaController dunn -Transient)

If you are using SnapMirror solely to move the data, you could also consider the NDMP copy cmdlets in Toolkit 2.0 to do that.

JLundfelt
6,736 Views

As always, thanks for the fast response. The error I get now is-

PS C:\Windows> Remove-NcSnapmirror -Destination irv-gdc-san1a:/vol/AI_1/EDW -Source irv-gdc-san1a:/vol/AI/EDW -SourceCon

troller (Connect-NaController irv-gdc-san1a -Transient)

Remove-NaSnapmirror : SnapMirror error: destination is not in snapmirrored state

At line:1 char:20

+ Remove-NaSnapmirror <<<<  -Destination irv-gdc-san1a:/vol/AI_1/EDW -Source irv-gdc-san1a:/vol/AI/EDW -SourceControlle

r (Connect-NaController irv-gdc-san1a -Transient)

    + CategoryInfo          : InvalidOperation: (irv-gdc-san1a:NaController) [Remove-NaSnapmirror], ESNAPMIRRORERROR

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.RemoveNaSnapmirror

cknight
6,736 Views

Remove-NaSnapmirror is a convenience cmdlet that wraps multiple APIs calls.  It is possible that your earlier invocation partially succeeded but left some elements of the relationship in place.  In order for Data ONTAP to fully remove a SnapMirror relationship, there are multiple steps:

1. Quiesce transfers (not covered by Remove-NaSnapmirror) --> Invoke-NaSnapmirrorQuiesce

2. Release the mirror at the source controller --> Invoke-NaSnapmirrorRelease

3. Break the mirror at the destination --> Invoke-NaSnapmirrorBreak

4. Remove the destination base snapshot --> Remove-NaSnapshot

5. Remove the schedule at the destination --> Remove-NaSnapmirrorSchedule or Remove-NaSnapmirrorSyncSchedule

So if Get-NaSnapmirror returns a relationship but Remove-NaSnapmirror isn't working, try the steps individually to see where the problem might be.

JLundfelt
6,736 Views

Thanks, that is really helpful, but what of snapmirror relationships that have long been off /broken-

Source                           Destination                      Status     State            LagTimeTS
------                           -----------                      ------     -----            ---------
IRV-SAN-NA1:dealerads            IRV-SAN-NA1:Dealer_Ads           idle       broken-off    184.15:04:09
irv-san-na1:Dev_DW               IRV-SAN-NA1:Dev_DW_NEW           idle       unknown           00:00:00
irv-san-na1:DWMS13VOL2           IRV-SAN-NA1:DWMS13VOL2_NEW       idle       unknown           00:00:00
irv-san-na1:DWMS14VOL2           IRV-SAN-NA1:DWMS14VOL2_NEW       idle       unknown           00:00:00
irv-san-na1:DWMS15VOL2           IRV-SAN-NA1:DWMS15VOL2_NEW       idle       unknown           00:00:00
irv-san-na1:DWMS16VOL2           IRV-SAN-NA1:DWMS16VOL2_NEW       idle       unknown           00:00:00

I'd like to just do a  get-nasnapmirror | Remove-NaSnapmirror -SourceController (Connect-NaController irv-san-na1 -Transient)

But it errors out since the destination volumes have since been removed / renamed-

Removing snapmirror relationship

Are you sure you wish to remove the snapmirror relationship with source IRV-SAN-NA1:dealerads and destination IRV-SAN-NA1:Dealer_Ads?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a

Remove-NaSnapmirror : SnapMirror error: source is offline, is restricted, or does not exist

At line:1 char:39

+ get-nasnapmirror | Remove-NaSnapmirror <<<<  -SourceController (Connect-NaController irv-san-na1 -Transient)

    + CategoryInfo          : InvalidOperation: (irv-san-na1:NaController) [Remove-NaSnapmirror], ESNAPMIRRORERROR

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.RemoveNaSnapmirror

Any thoughts on how to force removal?

Message was edited by: Jon Lundfelt Update, Here is the output of each step- get-nasnapmirror | Invoke-NaSnapmirrorRelease Release SnapMirror relationship Are you sure you want to release SnapMirror relationship from IRV-SAN-NA1:dealerads to IRV-SAN-NA1:Dealer_Ads? [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a Invoke-NaSnapmirrorRelease : SnapMirror error: source is offline, is restricted, or does not exist get-nasnapmirror | Invoke-NaSnapmirrorBreak Break SnapMirror relationship Are you sure you want to break SnapMirror for destination IRV-SAN-NA1:Dealer_Ads? [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a Invoke-NaSnapmirrorBreak : SnapMirror error: destination is not in snapmirrored state get-nasnapmirror | Remove-NaSnapmirrorSchedule Remove-NaSnapmirrorSchedule : Unable to delete schedule for location: IRV-SAN-NA1:Dealer_Ads.

JLundfelt
6,736 Views

nevermind, it was because the base snapshots on the destination needed to be removed.

Thanks!

Public