Microsoft Virtualization Discussions

SnapshotBlocksReserved value returned by Get-NaVol is in KB units, not bytes

ronaldmajor

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 3.2.0.65 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
32212254720

PS C:\TEMP\testFolder> Get-NaVolSize -Name testvol
                                                                                                                                                       VolumeSize

                                                                                                                                                       ----------

                                                                                                                                                      32212254720

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?

Thanks,

 

1 REPLY 1

ronaldmajor

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.

 

Announcements
Register for Insight 2021 Digital

INSIGHT 2021 Digital: Meet the Specialists 2

On October 20-22, gear up for a fully digital, totally immersive virtual experience with a downright legendary lineup of world-renowned specialists. Tune in for visionary conversations, solution deep dives, technical sessions and more.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public