Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
I am trying to script the snapmirror failover process using PTK. When I run the following set of commands, # Update Existing SnapMirror and then Break it off Invoke-NcSnapMirrorUpdate -Controller $DstCtrl -DestinationVserver $DstSVM -DestinationVolume $DstVol -ErrorAction stop Watch-Command { Get-NcSnapMirror -Controller $DstCtrl -DestinationVserver $DstSVM -DestinationVolume $DstVol | Select Status } -Until "idle" Invoke-NcSnapMirrorQuiesce -Controller $DstCtrl -DestinationVserver $DstSVM -DestinationVolume $DstVol -ErrorAction stop Watch-Command { Get-NcSnapMirror -Controller $DstCtrl -DestinationVserver $DstSVM -DestinationVolume $DstVol | Select Status } -Until "quiesced" Invoke-NcSnapMirrorBreak -Controller $DstCtrl -DestinationVserver $DstSVM -DestinationVolume $DstVol -Confirm:$false -ErrorAction stop the Invoke-NcSnapMirrorBreak sometime returns with an error: Invoke-NcSnapMirrorBreak : Another SnapMirror operation is in progress. At Z:\Software\NetApp\Powershell Toolkit\Scripts\SnapMirror-Reverse-v3.ps1:119 char:1 + Invoke-NcSnapMirrorBreak -Controller $DstCtrl -DestinationVserver $Ds ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (apfas8200:NcController) [Invoke-NcSnapmirrorBreak], EANOTHER_OP_ACTIVE + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNcSnapmirrorBreak Why does it report another operation is in progress? I just checked the status, and it was quiesced. It does not fail every time it runs, just some of the time. I have many snapmirrors where I perform this operation repeatedly. Many work just fine and then others seem to fail nearly all the time. I can sometimes just resume the snapmirror and start the script again and it runs without any issues on the same snapmirror. Is there some code I can add to check and try again... like maybe 3 times before aborting? 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?
... View more
Please see attached picture, it pops the error message whenver we run "Add-Credential ip-address -cred CredInfo" and supplying password. Please help any useful idea/info. thank you
... View more
I create a snapshot policy name mypolicy1 PS C:\File> Get-NcSnapshotPolicymypolicy1 Policy Enabled SnapshotPolicySchedules ------ ------- ----------------------- mypolicy1True {1min (5)} and I have volume name vol1 PS C:\File> get-ncvol -Vserver svm1 -name vol1 Name State TotalSize Used Available Dedupe Aggregate Vserver ---- ----- --------- ---- --------- ------ --------- ------- vol1 online 1.0 GB 972.3 MB aggr1 svm1 the vol1's snapshot policy is default now PS C:\File> (Get-Ncvol -Vserver svm1 -Name vol1).SnapshotPolicy Name Uuid ---- ---- default ba1e9fa1-e597-11ed-bc7b-00a098e1d252 when I want to change the vol1's snapshot policy to mypolicy1 I use the powershell command PS C:\File> Get-Ncvol -Vserver svm1 -Name vol1 |Set-NcSnapshotPolicy -Name mypolicy1 Policy Enabled SnapshotPolicySchedules ------ ------- ----------------------- mypolicy1 True {1min (5)} but it still use the default snapshot policy PS C:\File> (Get-Ncvol -Vserver svm1 -Name vol1).SnapshotPolicy Name Uuid ---- ---- default ba1e9fa1-e597-11ed-bc7b-00a098e1d252 I try to change the snapshot policy in GUI, and it's work Can anyone help me, how to change snapshot policy by powershell?
... View more
The link to download the powershell toolkit as per forums is https://mysupport-beta.netapp.com/ui/tools/tool-eula/5dd4e425ea373600018f94be
but when I get to that link, its a blank page.
I am trying to download the latest powershell toolkit to be able to perform snapmirror actions like break and restore etc.
Thanks
Satish
... View more
Hi All,
I need some help for a powershell script. I like to do a report for some Netapp Clusters to receive Information about Name,Ip,Location, Nodes, Nodes IP mgmt ip , aso. and all helpfull stuff
How can I extract this data, and the best way would be to do this in a biger foreach loop with multible clusters..
$myCol = @()
Connect-NaController $clusters -Credential $ControllerCredential
[System.Array]$Nodes = Get-NcNode Foreach($Node in $Nodes){ $x = "" | Select Node,Model,NodeSerialNumber,NodeSystemId,Version,IP
$x.Node = $Node.Node $x.model = $Node.NodeModel $x.NodeSerialNumber = $Node.NodeSerialNumber $x.NodeSystemId = $Node.NodeSystemId $x.Version = $Node.ProductVersion.Split(":")[0] $x.IP = $Node | Get-NcNetInterface -Role node_mgmt | select Address
$mycol += $x
}
$mycol
... View more