<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell: How change the tiering-policy for a volume? in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/454414#M43844</link>
    <description>&lt;P&gt;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&lt;/P&gt;&lt;P&gt;VolumeCompAggrAttributes on any given volume.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PS C:\&amp;gt; (get-ncvol vol_1).VolumeCompAggrAttributes

NcController  TieringPolicy
------------  -------------
xxxxxxxxxxxx  all&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can set the tiering policy at volume creation in powershell using new-ncvol option of -TieringPolicy &amp;lt;string&amp;gt;.&amp;nbsp; And you can update the policy using update-nvcol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;update-ncvol -query @{name="$vol"} -Attributes @{VolumeCompAggrAttributes=@{TieringPolicy="all"}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A good thing to note is how update-nvol allows you to update any attribute/setting versus what is limited in set-ncvol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Aug 2024 08:40:57 GMT</pubDate>
    <dc:creator>FED_ESB</dc:creator>
    <dc:date>2024-08-10T08:40:57Z</dc:date>
    <item>
      <title>Powershell: How change the tiering-policy for a volume?</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448518#M42881</link>
      <description>&lt;P&gt;I am running ONTAP 9.11P8 .I have tried various commands, but I have had no luck with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update-Ncvol&lt;/P&gt;&lt;P&gt;Set-Ncvol&lt;/P&gt;&lt;P&gt;Set-Ncvoloption&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also consulted Google Bard (claiming it is updated to 9.11P8), which suggests:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Import the NetApp ONTAP PowerShell module&lt;BR /&gt;Import-Module NetApp.Ontap.PowerShell&lt;/P&gt;&lt;P&gt;# Rename the volume&lt;BR /&gt;Set-NcVol -Name myvolume1 -NewName myvolume&lt;/P&gt;&lt;P&gt;# Get the current tiering policy&lt;BR /&gt;$tieringPolicy = Get-NcVol -Name myvolume | Select-Object -ExpandProperty TieringPolicy&lt;/P&gt;&lt;P&gt;# Set the new tiering policy&lt;BR /&gt;$tieringPolicy = "all"&lt;/P&gt;&lt;P&gt;# Update the volume with the new tiering policy&lt;BR /&gt;Set-NcVol -Name myvolume -TieringPolicy $tieringPolicy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I keep getting the error: "Select-Object: Property "TieringPolicy" cannot be found"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omitting the pipe to "Select-Object -ExpandProperty TieringPolicy" works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;$tieringPolicy = Get-NcVol -Name myvolume&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this simply not supported in powershell for 9.11P8? Do I have to look into REST API calls?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 15:16:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448518#M42881</guid>
      <dc:creator>Northman</dc:creator>
      <dc:date>2023-10-31T15:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell: How change the tiering-policy for a volume?</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448519#M42882</link>
      <description>&lt;P&gt;Is it safe to say you have the volume on a FabricPoll Aggr already? Does it already have a tiering policy?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 15:19:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448519#M42882</guid>
      <dc:creator>keitha</dc:creator>
      <dc:date>2023-10-31T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell: How change the tiering-policy for a volume?</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448520#M42883</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 15:25:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448520#M42883</guid>
      <dc:creator>Northman</dc:creator>
      <dc:date>2023-10-31T15:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell: How change the tiering-policy for a volume?</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448690#M42909</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;as far as I know there is only a command to get you the information about the tiering policy.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Get-NcVolumeTieringPolicies"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The only two ways I can think of is via the Powershell Invoke SSH-Function or you can always go with the REST API POST (which I would recommend)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kai&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Nov 2023 16:37:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/448690#M42909</guid>
      <dc:creator>TzwaynY</dc:creator>
      <dc:date>2023-11-07T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell: How change the tiering-policy for a volume?</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/454414#M43844</link>
      <description>&lt;P&gt;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&lt;/P&gt;&lt;P&gt;VolumeCompAggrAttributes on any given volume.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PS C:\&amp;gt; (get-ncvol vol_1).VolumeCompAggrAttributes

NcController  TieringPolicy
------------  -------------
xxxxxxxxxxxx  all&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can set the tiering policy at volume creation in powershell using new-ncvol option of -TieringPolicy &amp;lt;string&amp;gt;.&amp;nbsp; And you can update the policy using update-nvcol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;update-ncvol -query @{name="$vol"} -Attributes @{VolumeCompAggrAttributes=@{TieringPolicy="all"}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A good thing to note is how update-nvol allows you to update any attribute/setting versus what is limited in set-ncvol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 08:40:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Powershell-How-change-the-tiering-policy-for-a-volume/m-p/454414#M43844</guid>
      <dc:creator>FED_ESB</dc:creator>
      <dc:date>2024-08-10T08:40:57Z</dc:date>
    </item>
  </channel>
</rss>

