NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

powershell toolkit difference from system manager GUI or scheduled snapmirror.

JeffM
3,926 Views

I have created a powershell script which creates volumes and snapmirrors. Near the end I attemp to set a junction point on the target side. I ensure that the snapmirror is initialized and then i do a snapmirror update using Invoke-NcSnapmirrorUpdate.  I then wait until it is complete. For some reason the target side junction creation fails with the below error unless 1 of 2 things happens.  

 

1. The snapshot schedule kicks off

2. I manually sync the volume from the web gui in system manager. 

 

mount-NcVol : Failed to create or determine if a junction exists within volume "name_images_mirror". Error occurred with the remaining junction path of "/name_word03" for the given path
of "/name_images/name_word03" Reason: Junction create failed (30).
At C:\secu\provision hyland.ps1:80 char:22
+ ... etVserver | mount-NcVol -name $NewVolNameTarget -JunctionPath $rootJu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (xx.xxx.xxx.xxx:NcController) [Mount-NcVol], EAPIERROR
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Volume.MountNcVol

 

once the auto scheduled snapmirror update occurs the junction can be created just fine. This leaves me to believe that there is a difference between powershell Invoke-NcSnapmirrorUpdate and the auto update that happens via schedule or the manually done method via system manager gui. 

 

I have obfuscated the IP and names in this example.  I am using the latest PS toolkit. 

1 ACCEPTED SOLUTION

JeffM
3,921 Views

SOLVED. 

Apparently, In the volume create command you must have  and export policy set such as ' -ExportPolicy "default" ' .  If this is not set, then just after the snapmirror update when done from system manager GUI or the automatic schedule it will detect that no policy was specified and add default.  The powershell snapmirror update does not do this. 

 

 

View solution in original post

2 REPLIES 2

JeffM
3,922 Views

SOLVED. 

Apparently, In the volume create command you must have  and export policy set such as ' -ExportPolicy "default" ' .  If this is not set, then just after the snapmirror update when done from system manager GUI or the automatic schedule it will detect that no policy was specified and add default.  The powershell snapmirror update does not do this. 

 

 

JeffM
3,919 Views

It would be nice if the commands were the same. I would recommend modifying the powershell toolkit to pass along -ExportPolicy with a value of "default", even when no -ExportPolicy  argument is supplied. In that way it would behave the same as the automatic snapmirror schedule and the GUI snapmirror update. 

 

 

 

Public