ONTAP Rest API Discussions

Volume Efficiency auto-state setting with PowerShell?

JimRobertson
1,609 Views

There is a field in the volume efficiencies called "auto-state" that does not seem to be accessible using standard PowerShell commands (Get-NcSis or Get-NcVolume). From the CLI, it is only visable in diag mode. Does anyone know any way to pull this information using PowerShell, other than using Invoke-NcSSH?

 

This is the command to view it in the CLI (while in diag):

vol efficiency show -volume vol1 -fields auto-state


I'm asking because we have workflows in WFA that are failing when we try to set the efficiencies on volumes that have been "deprioritized".

1 ACCEPTED SOLUTION

mbeattie
1,297 Views

Hi Jim,

 

Here's an example of using the ONTAP REST CLI. You can either use ZAPI or REST API to invoke a CLI command. The following link has examples of both (you would just have to change the command in the example)

 

https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-equivalent-of-discovery-mode/m-p/451567#M6862 

 

Hope that helps

 

/Matt

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

4 REPLIES 4

darr613
1,386 Views

Hello Jim,

There is a Netapp efficiency check script that is supported by this community
https://www.powershellgallery.com/packages/NetAppEfficiencyCheck/1.4

I am not sure if the "auto-state" attribute is listed among the outputs in the latest version 1.4.

I hope this leads you in the right direction
https://kb.netapp.com/onprem/ontap/dm/Efficiency/How_to_check_AFF_storage_efficiency_with_the_NetApp_PowerShell_Toolkit

darr613
1,385 Views

auto-state will show if a volume is deprioritized, only available in diagnostic mode so have to get it through SSH

Please check the below lib for "auto-state"
https://www.powershellgallery.com/packages/NetAppEfficiencyCheck/1.2/Content/NetAppEfficiencyCheck.ps1




mbeattie
1,298 Views

Hi Jim,

 

Here's an example of using the ONTAP REST CLI. You can either use ZAPI or REST API to invoke a CLI command. The following link has examples of both (you would just have to change the command in the example)

 

https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-equivalent-of-discovery-mode/m-p/451567#M6862 

 

Hope that helps

 

/Matt

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

JimRobertson
1,247 Views

Thank you, @mbeattie , this is exactly what I was looking for, it works great!

Public