<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress. in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457622#M7022</link>
    <description>&lt;P&gt;Hi MRoney,&lt;/P&gt;&lt;P&gt;did you resolve with delay?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2024 18:34:02 GMT</pubDate>
    <dc:creator>Luis_KawaZ750</dc:creator>
    <dc:date>2024-12-27T18:34:02Z</dc:date>
    <item>
      <title>Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169532#M6433</link>
      <description>&lt;P&gt;I am trying to script the snapmirror failover process using PTK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following set of commands,&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;# Update Existing SnapMirror and then Break it off&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000FF"&gt;Invoke-NcSnapMirrorUpdate &lt;FONT color="#000000"&gt;-Controller&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;$DstCtrl&lt;/FONT&gt;&lt;FONT color="#000000"&gt; -DestinationVserver&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;$DstSVM&lt;/FONT&gt;&lt;FONT color="#000000"&gt; -DestinationVolume&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt; $DstVol&lt;/FONT&gt;&lt;FONT color="#000000"&gt; -ErrorAction &lt;/FONT&gt;&lt;FONT color="#800080"&gt;stop&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000FF"&gt;Watch-Command { Get-NcSnapMirror &lt;FONT color="#000000"&gt;-Controller&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#FF0000"&gt; $DstCtrl &lt;/FONT&gt;-DestinationVserver &lt;FONT color="#FF0000"&gt;$DstSVM&lt;/FONT&gt; -DestinationVolume &lt;FONT color="#FF0000"&gt;$DstVol&lt;/FONT&gt; | Select &lt;FONT color="#800080"&gt;Status&lt;/FONT&gt; } -Until&lt;FONT color="#800000"&gt; "idle"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;FONT color="#0000FF"&gt;Invoke-NcSnapMirrorQuiesce&lt;/FONT&gt; -Controller &lt;FONT color="#FF0000"&gt;$DstCtrl&lt;/FONT&gt; -DestinationVserver &lt;FONT color="#FF0000"&gt;$DstSVM&lt;/FONT&gt; -DestinationVolume &lt;FONT color="#FF0000"&gt;$DstVol&lt;/FONT&gt; -ErrorAction stop&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;FONT color="#0000FF"&gt;Watch-Command { Get-NcSnapMirror&lt;/FONT&gt; -Controller &lt;FONT color="#FF0000"&gt;$DstCtrl&lt;/FONT&gt; -DestinationVserver &lt;FONT color="#FF0000"&gt;$DstSVM&lt;/FONT&gt; -DestinationVolume &lt;FONT color="#FF0000"&gt;$DstVol&lt;/FONT&gt; | Select Status } -Until "quiesced"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;FONT color="#0000FF"&gt;Invoke-NcSnapMirrorBreak&lt;/FONT&gt; -Controller &lt;FONT color="#FF0000"&gt;$DstCtrl&lt;/FONT&gt; -DestinationVserver&lt;FONT color="#FF0000"&gt; $DstSVM&lt;/FONT&gt; -DestinationVolume &lt;FONT color="#FF0000"&gt;$DstVol&lt;/FONT&gt; -Confirm:$false -ErrorAction stop&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the Invoke-NcSnapMirrorBreak sometime returns with an error:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;Invoke-NcSnapMirrorBreak : Another SnapMirror operation is in progress.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;At Z:\Software\NetApp\Powershell Toolkit\Scripts\SnapMirror-Reverse-v3.ps1:119 char:1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;+ Invoke-NcSnapMirrorBreak -Controller $DstCtrl -DestinationVserver $Ds ...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;+ CategoryInfo : InvalidOperation: (apfas8200:NcController) [Invoke-NcSnapmirrorBreak], EANOTHER_OP_ACTIVE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNcSnapmirrorBreak&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does it report another operation is in progress?&amp;nbsp; I just checked the status, and it was quiesced.&lt;/P&gt;&lt;P&gt;It does not fail every time it runs, just some of the time.&amp;nbsp; I have many snapmirrors where I perform this operation repeatedly.&amp;nbsp; Many work just fine and then others seem to fail nearly all the time.&amp;nbsp; I can sometimes just resume the snapmirror and start the script again and it runs without any issues on the same snapmirror.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some code I can add to check and try again... like maybe 3 times before aborting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or better yet, does anyone know what I am not doing correctly to make sure the snapmirror is not performing another operation before I request the snapmirror break?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 05:07:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169532#M6433</guid>
      <dc:creator>MRoney</dc:creator>
      <dc:date>2021-08-27T05:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169598#M6435</link>
      <description>&lt;P&gt;I'm not seeing anything wrong with the script. But adding a 3 second wait time following each watch-command may be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;incorporating Python may help.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.netapp.com/us-en/ontap-select/concept_api_before_python.html" target="_blank"&gt;https://docs.netapp.com/us-en/ontap-select/concept_api_before_python.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I found the below on creating a time delay in Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://realpython.com/python-sleep/#adding-a-python-sleep-call-with-timesleep" target="_blank"&gt;https://realpython.com/python-sleep/#adding-a-python-sleep-call-with-timesleep&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 04:23:16 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169598#M6435</guid>
      <dc:creator>aladd</dc:creator>
      <dc:date>2021-08-31T04:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169599#M6436</link>
      <description>&lt;P&gt;I agree with aladd that adding a delay after the "Watch-Command" lines is good practice. Power shell has a built in command to add the delay. The scripts I see add 15-30 seconds.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class="hljs-pscommand"&gt;Start-Sleep&lt;/SPAN&gt;&lt;SPAN class="hljs-parameter"&gt; -s&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;15&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 05:25:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169599#M6436</guid>
      <dc:creator>NetApp_SR</dc:creator>
      <dc:date>2021-08-31T05:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169848#M6437</link>
      <description>&lt;P&gt;Thank you for the feedback.&amp;nbsp; I am adding the delay and will let you know how that worked out.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 16:50:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/169848#M6437</guid>
      <dc:creator>MRoney</dc:creator>
      <dc:date>2021-09-09T16:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457622#M7022</link>
      <description>&lt;P&gt;Hi MRoney,&lt;/P&gt;&lt;P&gt;did you resolve with delay?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 18:34:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457622#M7022</guid>
      <dc:creator>Luis_KawaZ750</dc:creator>
      <dc:date>2024-12-27T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457623#M7023</link>
      <description>&lt;P&gt;Unfortunately, the delay did not resolve the issue.&amp;nbsp; I ended up re-writing the code.&amp;nbsp; Below is the replacement code I used.&amp;nbsp; Note: I am not a great PowerShell programmer, so I am sure there is a bunch of this that could be improved, but we have not had any EANOTHER_OP_ACTIVE issues with this new code..... basically, it just keeps retrying until success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Update Existing SnapMirror and then Break it off&lt;BR /&gt;Wr G "";Wr G "Updating Existing Snapmirror:"&lt;BR /&gt;do {&lt;BR /&gt;$jobstatus = Invoke-NcSnapMirrorUpdate -Controller $DstCtrl -Destination $DstLoc -Source $SrcLoc -ONTAPI&lt;BR /&gt;sleep 5&lt;BR /&gt;Write-Host ($jobstatus | Format-Table | Out-String)&lt;BR /&gt;} until ($jobstatus.Status -eq 'succeeded')&lt;/P&gt;&lt;P&gt;do {&lt;BR /&gt;$smstatus = Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;BR /&gt;sleep 5&lt;BR /&gt;Write-Host ($smstatus | Format-Table | Out-String)&lt;BR /&gt;} until ($smstatus.MirrorState -eq 'snapmirrored' -and $smstatus.Status -eq 'idle')&lt;BR /&gt;&lt;BR /&gt;Wr G "";Wr G "SnapMirror Status after Update:"&lt;/P&gt;&lt;P&gt;$smstatus = Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;BR /&gt;Write-Host ($smstatus | Format-Table | Out-String)&lt;/P&gt;&lt;P&gt;$worked = $false&lt;BR /&gt;while (-not $worked) {&lt;BR /&gt;try {&lt;BR /&gt;Invoke-NcSnapMirrorQuiesce -Controller $DstCtrl -Destination $DstLoc -ONTAPI -ErrorAction Stop&lt;BR /&gt;$worked = $true # An exception will skip this&lt;BR /&gt;} catch {&lt;BR /&gt;Write-Host ("Error:", $_)&lt;BR /&gt;Write-Host ("Retrying...")&lt;BR /&gt;sleep 5&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;do {&lt;BR /&gt;$smstatus = Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;BR /&gt;sleep 5&lt;BR /&gt;Write-Host ($smstatus | Format-Table | Out-String)&lt;BR /&gt;} until ($smstatus.MirrorState -eq 'snapmirrored' -and $smstatus.Status -eq 'quiesced')&lt;BR /&gt;&lt;BR /&gt;Wr G "";Wr G "SnapMirror Status after Quiesce:"&lt;/P&gt;&lt;P&gt;Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;/P&gt;&lt;P&gt;$worked = $false&lt;BR /&gt;while (-not $worked) {&lt;BR /&gt;try {&lt;BR /&gt;Invoke-NcSnapMirrorBreak -Controller $DstCtrl -Destination $DstLoc -Confirm:$false -ONTAPI -ErrorAction Stop&lt;BR /&gt;$worked = $true # An exception will skip this&lt;BR /&gt;} catch {&lt;BR /&gt;Write-Host ("Error:", $_)&lt;BR /&gt;Write-Host ("Retrying...")&lt;BR /&gt;sleep 5&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;do {&lt;BR /&gt;$smstatus = Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;BR /&gt;sleep 5&lt;BR /&gt;Write-Host ($smstatus | Format-Table | Out-String)&lt;BR /&gt;} until ($smstatus.MirrorState -eq 'broken-off' -and $smstatus.Status -eq 'idle')&lt;/P&gt;&lt;P&gt;do {&lt;BR /&gt;$smstatus = Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;BR /&gt;sleep 5&lt;BR /&gt;Write-Host ($smstatus | Format-Table | Out-String)&lt;BR /&gt;} until ($smstatus.MirrorState -eq 'broken-off' -and $smstatus.Status -eq 'idle')&lt;BR /&gt;Wr G "";Wr G "SnapMirror Status after Break:"&lt;/P&gt;&lt;P&gt;Get-NcSnapMirror -Controller $DstCtrl -Destination $DstLoc -ontapi&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 18:53:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457623#M7023</guid>
      <dc:creator>MRoney</dc:creator>
      <dc:date>2024-12-27T18:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSnapMirrorBreak - Another SnapMirror operation is in progress.</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457624#M7024</link>
      <description>&lt;P&gt;Hi MRoney,&lt;/P&gt;&lt;P&gt;I'll try your solution!&lt;/P&gt;&lt;P&gt;Thanks a lot and happy new year!&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 18:39:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSnapMirrorBreak-Another-SnapMirror-operation-is-in-progress/m-p/457624#M7024</guid>
      <dc:creator>Luis_KawaZ750</dc:creator>
      <dc:date>2024-12-28T18:39:39Z</dc:date>
    </item>
  </channel>
</rss>

