ONTAP Discussions
ONTAP Discussions
I am running ONTAP 9.11P8 .I have tried various commands, but I have had no luck with:
Update-Ncvol
Set-Ncvol
Set-Ncvoloption
I also consulted Google Bard (claiming it is updated to 9.11P8), which suggests:
# Import the NetApp ONTAP PowerShell module
Import-Module NetApp.Ontap.PowerShell
# Rename the volume
Set-NcVol -Name myvolume1 -NewName myvolume
# Get the current tiering policy
$tieringPolicy = Get-NcVol -Name myvolume | Select-Object -ExpandProperty TieringPolicy
# Set the new tiering policy
$tieringPolicy = "all"
# Update the volume with the new tiering policy
Set-NcVol -Name myvolume -TieringPolicy $tieringPolicy
But I keep getting the error: "Select-Object: Property "TieringPolicy" cannot be found"
Omitting the pipe to "Select-Object -ExpandProperty TieringPolicy" works:
i.e
$tieringPolicy = Get-NcVol -Name myvolume
Is this simply not supported in powershell for 9.11P8? Do I have to look into REST API calls?
Solved! See The Solution
Hi,
as far as I know there is only a command to get you the information about the tiering policy.
Is it safe to say you have the volume on a FabricPoll Aggr already? Does it already have a tiering policy?
hi, yes, it is a test volume, though. I can see it has the snapshot policy right now. It is in a aggregate that is setup with a FabricPool.
Hi,
as far as I know there is only a command to get you the information about the tiering policy.
I understand this is an old question, and I came across it while searching for how to set the tiering policy for a new fsx instance. There is another way to get the status in powershell using the
VolumeCompAggrAttributes on any given volume.
PS C:\> (get-ncvol vol_1).VolumeCompAggrAttributes
NcController TieringPolicy
------------ -------------
xxxxxxxxxxxx all
You can set the tiering policy at volume creation in powershell using new-ncvol option of -TieringPolicy <string>. And you can update the policy using update-nvcol
update-ncvol -query @{name="$vol"} -Attributes @{VolumeCompAggrAttributes=@{TieringPolicy="all"}}
A good thing to note is how update-nvol allows you to update any attribute/setting versus what is limited in set-ncvol.
Good Luck