ONTAP Discussions

change tiering-minimal-cooling-days with powershell toolkit

Ruud_Does
4,556 Views

Hi Guys,

 

In my quest to automate as much as possible i've noticed that (afaik) it isn't possible to change the tiering-minimal-cooling-days from the ontap powershell commands.

 

If you look at the volume options available you can see that you can change the tiering-policy using powershell by changing the $volume.VolumeCompAggrAttributes.TieringPolicy (from CLI: volume modify -volume (volume) -vserver (vserver) -tiering-policy, but you can't change the minimum cooling days there if the policy is set to auto (from cli: volume modify -volume (volume) -vserver (vserver) -tiering-minimal-cooling-days.

 

Ontap version: 9.7P3
powershell Toolkit: 9.7.1

 

Offcourse you could script it using the ssh commands from powershell (invoke-ncssh or invoke-ncsystemapi) but that still feels like a workaround instead of running it directly from powershell.

 

 

 

4 REPLIES 4

donny_lang
4,454 Views

I wasn't able to find a way to do it with a native PSTK cmdlet either, for what it's worth. I would recommend doing it via Invoke-NcSsh or Invoke-NcSystemApi like you mentioned, although I agree it is not as clean as using an actual cmdlet. 

Ruud_Does
4,391 Views

Hi Donny,

 

Thank you for the reply, I was afraid you were going to say this. The biggest issue is that in order to use these commands you need to loop through it per volume instead of just getting the volumes within powershell and setting the value per volume. It slows down the script and it makes your script a lot less flexible.

 

Let's hope it will get corrected in a future release of the toolkit.

moep
4,309 Views

The powershell toolkit uses the ZAPI and NetApp is phasing it out in favour of the new REST API. I doubt you will see new features in the ZAPI / PSTK.

DaleHarris
3,303 Views

Why couldn't you use PowerShell to perform the grabs on the volumes, then simply set up a foreach on the object to go through and invoke the SSH command? Kind of a hybrid approach? Or I could misreading the ask here.

 

#*Psuedocode, do not use in production*

$creds = (get-credential)

$IP = "cluster_IP"

connect-nccluster -cred $creds -cluster $IP

$volumes - get-ncvolume

foreach ($volume in $volumes){

invoke-ncssh -cred $creds -IP $IP "volume modify -volume ($volume.name) -vserver ($volume.vserver) -tiering-minimal-cooling-days XYZ"

}

Public