Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Modifying Volume Tiering Policy With Update-NcVol Failing
2022-08-11
11:01 AM
1,350 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've seen a few posts regarding the 'Update-NcVol' cmdlet and how it can be problematic. I've also attempted the multiple syntaxes that I've come across, however each attempt has resulted in failing to update the object. I'm hoping someone might be able review the following snippet and let me know if there are any potential issues with it or another way to update the tiering policy (short of using Invoke-SSH). This syntax was taken directly from the Get-Help page for the cmdlet. Thanks!
Environment:
PSVersion: 5.1.14393.5127
CLRVersion: 4.0.30319.42000
DataonTap Version : 9.10.1.2111
$q = Get-NcVol -Template
Initialize-NcObjectProperty $q VolumeIdAttributes
$q.VolumeIdAttributes.Name = "vol1"
$q.VolumeIdAttributes.OwningVserverName = "svm_0"
$a = Get-NcVol -Template
Initialize-NcObjectProperty $a VolumeCompAggrAttributes
$a.VolumeCompAggrAttributes.TieringPolicy = "all"
Update-NcVol -Query $q -Attributes $a
Output :
SuccessCount : 0
FailureCount : 1
SuccessList : {}
FailureList : {vol1}
Solved! See The Solution
1 ACCEPTED SOLUTION
danflashes has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dan,
That's odd, the code worked fine when testing it in my lab.
$Credential = Get-Credential -Credential admin
Connect-NcController -Name cluster1.testlab.local -HTTPS -Credential $Credential
$q = Get-NcVol -Template
Initialize-NcObjectProperty $q VolumeIdAttributes
$q.VolumeIdAttributes.Name = "cifs_data_001"
$q.VolumeIdAttributes.OwningVserverName = "vserver1"
$a = Get-NcVol -Template
Initialize-NcObjectProperty $a VolumeCompAggrAttributes
$a.VolumeCompAggrAttributes.TieringPolicy = "all"
Update-NcVol -Query $q -Attributes $a
Output:
Name Address Vserver Version
---- ------- ------- -------
cluster1.testlab.... 192.168.100.2 NetApp Release 9.10.1: Sat Jan 15 10:49:44 UTC 2022
NcController : cluster1.testlab.local
SuccessCount : 1
FailureCount : 0
SuccessList : {cifs_data_001}
FailureList : {}
Have you tried the same operation using the REST API? Assuming it works fine using the CLI?
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
1 REPLY 1
danflashes has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dan,
That's odd, the code worked fine when testing it in my lab.
$Credential = Get-Credential -Credential admin
Connect-NcController -Name cluster1.testlab.local -HTTPS -Credential $Credential
$q = Get-NcVol -Template
Initialize-NcObjectProperty $q VolumeIdAttributes
$q.VolumeIdAttributes.Name = "cifs_data_001"
$q.VolumeIdAttributes.OwningVserverName = "vserver1"
$a = Get-NcVol -Template
Initialize-NcObjectProperty $a VolumeCompAggrAttributes
$a.VolumeCompAggrAttributes.TieringPolicy = "all"
Update-NcVol -Query $q -Attributes $a
Output:
Name Address Vserver Version
---- ------- ------- -------
cluster1.testlab.... 192.168.100.2 NetApp Release 9.10.1: Sat Jan 15 10:49:44 UTC 2022
NcController : cluster1.testlab.local
SuccessCount : 1
FailureCount : 0
SuccessList : {cifs_data_001}
FailureList : {}
Have you tried the same operation using the REST API? Assuming it works fine using the CLI?
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
