I found a strange behaviour when listing snapshots with Get-NcSnapshot. Can anyone spot my mistake? Basically, I try to build a script that modifies snapmirror-labels on all Snapshots containing a certain text string in their name. This was the script I tried: Get-NcSnapshot -SnapName *sometext* -Volume * | Set-NcSnapshot -SnapmirrorLabel yearly Since this did not work, I tried it manually: So I connect to the cluster and an SVM with: Connect-NcController -Name testcluster -Vserver int-nv001-nfs1 Then I run: Get-NcSnapshot -Volume * This only returns Snapshots from the Vserver root Volume If I run: Get-NcSnapshot -Volume nfs* It returns only Snapshots from a Volume called nfs_vdi001_data1 (although there are other Volumes called "nfs_vdi001_data2" and "nfs_vmware001_data1" etc. in the same Vserver) If I run: Get-NcSnapshot -Volume nfs_vmware* or Get-NcSnapshot -Volume nfs_vmware001_data* It returns only Snapshots from Volume nfs_vmware001_data1 (although there are other Volumes called "nfs_vmware001_data2", "nfs_vmware001_data3" etc.in the same Vserver) If I run: Get-NcSnapshot -Volume nfs_vmware001_data2 It returns only Snapshots from Volume nfs_vmware001_data2 (as expected) Target Cluster is ONTAP 9.11.1P4
... View more
I have been attempting to get started with teh above version of PSTK, to get away from ZAPI and onto REST. I have set up a clean Windows environment and installed the PSTK module. My test cluster is running OnTAP 9.10.1p8. I can connect just fine to it using ZAPI; but when I try to use this version of the toolkit, I get 401 authorization error. The user I am using has an admin role, so should have access to all APIs. I have been trying to find some specific documentation/examples, but have not found any yet. I hve a lot of background with PSTK and ZAPI, so I just need to know what is different using REST. Can anyone direct me to some use examples? Is 'connect-nccontroller' still used with REST?
... View more
Using 18.104.22.1688 toolkit. I am connecting to the controller with this which works just fine: Connect-NcController -Name MYNETAPP -HTTPS -ONTAPI Name Address Vserver Version ---- ------- ------- ------- MYNETAPP x.x.x.x NetApp Release 9.10.1P6: Fri Jul 01 12:06:33 UTC 2022 But when I issue a Add-NCCifsShare command I get this: PS C:\Windows\system32> Add-NcCifsShare -Name qt_myshare1_mirror$ -Path /MYNETAPP_vol_myshare1_mirror/qt_myshare1 -VserverContext MYVSERVER Add-NcCifsShare : HomeDirectory parameter specified, which is not supported for ONTAPI call At line:1 char:1 + Add-NcCifsShare -Name qt_myshare1_mirror$ -Path /MYNETAPP_vol_mysh ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Add-NcCifsShare], ArgumentException + FullyQualifiedErrorId : HomeDirectory parameter specified, which is not supported for ONTAPI call,DataONTAP.C.Po werShell.SDK.Cmdlets.Cifs.AddNcCifsShare I am not specifying the "HomeDirectory" parameter. Anyone else encountered this? This command worked fine in an earlier version of the toolkit (9.6). I read this article and will try the suggestion given there and report back. Solved: PowerShell Toolkit 22.214.171.1248 - iSCSI command not working - NetApp Community use Invoke-NcSsh or Invoke-NcSystemApi Thank you, christybiskit
... View more
I'm trying to create a script to add Snapmirror-Labels to snapshots that don't have one. Although i'm able to get a list of snapshots by Get-NcSnapshot, selecting a single snapshot by this command runs to a "operation timed out". -PowerShell ToolKit Version 126.96.36.1998 -Cluster/Ontap Version 9.10.1P7 -OS: Windows 10 22H2 Running the command as follows Get-NcSnapshot -Volume nfs_vmware3_vault | Select Name,Volume,Vserver,SnapmirrorLabel returns a proper list: Name Volume Vserver SnapmirrorLabel
---- ------ ------- ---------------
VeeamSnapVault_nfs_vmware3_monthly.2021-11-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2021-12-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2022-09-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2022-10-01_0001 nfs_vmware3_vault svm-nfs-dr trying to fetch a single object of these: Get-NcSnapshot -Volume nfs_vmware3_vault -SnapName VeeamSnapVault_nfs_vmware3_monthly.2022-10-01_0001 | Select Name,Volume,Vserver,SnapmirrorLabel runs into a timeout: Get-NcSnapshot : The operation has timed out
At line:1 char:1
+ Get-NcSnapshot -Volume nfs_vmware3_vault -SnapName VeeamSnapVault_nfs ...
+ CategoryInfo : NotSpecified: (:) [Get-NcSnapshot], ArgumentException
+ FullyQualifiedErrorId : The operation has timed out,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.GetNcSnapshot as of this, i'm not able so set a snapmirror label by "Set-NcSnapShot -snapmirrorlabel "xy"... am i doing something wrong or is this a bug?
... View more