Hi Techexperts,
i have been tasked by my customer with creating a volume based report for him, that contains
- Name of the volume
- Total Volume Size
- Used Data Space
- Free Data Space
- Used Snapshot Space
- Free Snapshot Space (regarding the reserve)
- Overflow Snapshot Space (if existing)
Getting the volume's data confuses me, because the GUI is showing values that is not reflecting by Get-NcVol, Get-NcEfficiency, Get-NcSnapshot... somehow.
We are running Ontap 8.3.1, but when viewing bar char on the volume's storage allocation tab, it seems the values are not assigned correctly to the lines.

I was using the Ontap Powershell Tookit to retrieve the values but i have some difficulties accumulating the snapshot spaces correctly
Get-NcEfficiency | sort-object Name | Select-Object Name, TotalLunSize, Used, Free, @{Label="SnapshotUsed";Expression={(Get-NcSnapshot $($_.Name) | Measure-Object Total -Sum).Sum }}, SnapshotReserve, SnapshotOverflow | Export-Csv -NoTypeInformation -Path "C:\temp\volumereport.csv"
Please feel free to correct me, but i was assuming that SnapshotReserve + SnapshotUsed + SnapshotOverflow = SnapshotTotal and that SnapshotReserve - SnapshotUsed = SnapshotFree
So when I run the command, the result for the volume shown is:
Name : D5
TotalLunSize : 0
Used : 660389388288
Free : 206657134592
SnapshotUsed : 278830014464
SnapshotReserve : 45634027520
SnapshotOverflow : 227582599168
or with some more readable values:
Name : D5
TotalLunSize : 0
Used : 1803,59
Free : 238,91
SnapshotUsed : 293,90
SnapshotReserve : 107,50
SnapshotOverflow : 61,32
As you can see, there are huge differences between what is shown in GUI and what is reported by the command.
And to make this problem more complex: for some volumes (mostly those without overflow space) there seem to be the same values displayed in GUI and in the result of the command.
So my questions are: which values can I trust and how do fetch the (correct) required values for the customers report