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.