Microsoft Virtualization Discussions

Invoke-NcSnapmirrorResync does nat catch some error and return succeeded


Hello Community,


I'm using PSTK version 4.5



And i'm trying to resync a snapmirror relationship without no common snapshot between source and destination volume

As expected through ONTAP i got the information and it fails:



cot-3-demofr::*> snapmirror resync -destination-path PSLAB3:nested

Error: command failed: Failed to get information for source volume "PSLAB_DR:nested" for confirmation. (No Snapshot copies found on volume

But running the same through PSTK return a succeeded message, without catching any error, but in fact it fails


[DBG]: PS C:\Users\masson\Documents\GitHub\svmdr>> Invoke-NcSnapmirrorResync -Destination PSLAB3:nested -Controller $mySecondaryController

NcController      :
ResultOperationId : 8ec6efcf-1e17-11e8-a647-00a0987fafe2
ErrorCode         : 
ErrorMessage      : 
JobId             : 
JobVserver        : 
Status            : succeeded

Is there any way for Invoke-NcSnapmirrorResync to return the same error as ONTAP when there is no common snapshots?



In this test the destination volume is in RW type (following a previous break of the relationship)

Maybe the problem come that fact : no common snapshot and RW type on destination

Because, in other situation RW type on destination but with common snapshot the resync really succeed 








This cmdlet normally returns with a job ID (ONTAP background job). You would need to monitor the job (Get-NcJob ...) to find out its result.


You could also use the -Passthru parameter so that the cmdlet gives you a real Snapmirror object, instead of a job ID.


Hope this helps,



Hi mark_schuren,


Thanks for your answer


But as you can see i my example, there is no job id returned

Event with -Passthru the command does not return any error or job id to monitor







what version of the PSTK are you running?


With Passthru I'm getting a usable object with type "DataONTAP.C.Types.Snapmirror.SnapmirrorInfo"




PS C:\> $relationship = Invoke-NcSnapmirrorResync -Destination dr01:nas01_software -Passthru

PS C:\> $relationship

SourceLocation                                DestinationLocation                   Status         MirrorState
--------------                                -------------------                   ------         -----------
nas01:software                                dr01:nas01_software                   transferring  snapmirrored


PS C:\> $relationship | Select DestinationLocation,Status,CurrentTransferType,IsHealthy

DestinationLocation       Status       CurrentTransferType IsHealthy
-------------------       ------       ------------------- ---------
dr01:nas01_software       transferring resync                   True


Hope this helps.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner