Microsoft Virtualization Discussions

Invoke-NcSnapmirrorResync does nat catch some error and return succeeded

masson
3,492 Views

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
721b38c9-e3d7-11e7-bd9b-00a0987fb00e:nested.)

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      : 10.65.176.31
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?

 

PS:

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 

 

TIA

 

 

 

3 REPLIES 3

mark_schuren
3,476 Views

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,

Mark

masson
3,464 Views

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

 

Regards,

Olivier

mark_schuren
3,225 Views

Hi,

 

what version of the PSTK are you running?

 

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

 

Example:

 

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.

Public