SnapshotBlocksReserved value returned by Get-NaVol is in KB units, not bytes
2014-11-05 09:38 AM
I am very new to PowerShell and the NetApp PowerShell toolkit, so I am trying understand what I am seeing when I run these commands. Therefore I double check
with what System Manager and the ONTAP CLI are reporting. I am using PowerShell 3 and the PowerShell Tooklit 126.96.36.199 on Windows 7.
One thing I noticed is that the SnapshotBlocksReserved value returned by Get-NaVol is in KB units, not bytes, as all the other volume size related values are.
I need to multiply SnapshotBlocksReserved by 1024 to get the value in bytes. I have seen numerous posts where people are assuming the value is in units of bytes.
Is this a bug with this version of the toolkit?
PS C:\TEMP\testFolder> (get-navol testvol).totalsize + (get-navol testvol).SnapshotBlocksReserved*1024
PS C:\TEMP\testFolder> Get-NaVolSize -Name testvol
Also, the output of Get-NaVolSize is right justified.
Lastly, is there a document that explains what all of the fields or attributes are that are used by the toolkit and what they mean, including units of measurement?
1 REPLY 1
Re: SnapshotBlocksReserved value returned by Get-NaVol is in KB units, not bytes
2014-11-05 10:46 AM
Funny how I start finding answers after I ask the question, regardless of how much research I do beforehand.
I found the ONTAPI docs in the 4.1 Managability SDK (I can't find the same in the 5.2 version).
According to the doc for the volume-info API:
|snapshot-blocks-reserved||integer||The number of 1024 byte blocks that has been set aside as reserve for snapshot usage. This is same as "blocks-reserved" in snapshot-get-reserve API output. Range : [0..2^64-1].|
This is the only value given in blocks. All of the other values are in bytes.
So, all the examples I have seen where people are converting this value to GB, they are actually converting it to TB and adding it to other values in GB.