Hello. I have noticed some deviation in value of Volume "percent-used" value for volume show command on different C-Mode ONTAP versions. It is also true also for ZAPI volume-get-iter "percentage-size-used" value (which is the same). What I have noticed:
On 8.3 and 9.2 "percent-used" = (Used data space + Snapshot Reserve Size) / Total Volume size
On 9.7 "percent-used" = Used data space / Data sector Size
So, on the latest 9.7 ONTAP calculation made differently. Could someone tell from which ONTAP version calculation approach has changed? And point the doc where this is mentioned (because I couldn't find this place at least for now).
[-percent-used <percent>] - Used Percentage If this parameter is specified, the command displays information only about the volume or volumes that have the specified percentage of used space. This row is based on a value of used space that includes the space used by Snapshot copies or the Snapshot reserve (whichever is greater) in relation to the current volume size.
If you can provide more explanations or examples, will help us troubleshoot it further.
Hello @Mjizzini . Thank you for prompt response. I will try to explain.
I am using volume-get-iter ZAPI call and use value of <percentage-size-used> from <volume-space-attributes> . As I have noticed on ONTAP 8.3 and 9.2 (I have those two version) I get percentage-size-used as (Used data space + Snapshot Reserve Size) / Total Volume size
However for same ZAPI call on ONTAP 9.7 I get value of percentage-size-used as Used data space / Data sector Size.
Then I've tried run volume show command with percent-used field on those ONTAP versions and noticed same situation.
Here are examples of output of this command:
C-Mode ONTAP 8.3RC1. Size of Snapshot reserve 10%. And it is shown as used space (alongside with used data 200kb which is less than 1%):
The same situation is for ONTAP 9.2:
However for ONTAP 9.7 the Snapshot reserve isn't included in this percentage. The value of percent used shows only data utilization (and snapshot spill, but not snapshot reserve size). Utilization is 3% despite Snapshot reserve is 50%:
I just want to know from which ONTAP version this calculation approach has changed and where this documented.
Are you using logical-space enforcement or reporting anywhere? If so, all bets are off and df will lie to you. I don't know what the APIs will do - agree with df, an NFS host df, or some magical combination.
ONTAP CLI shows volume at 56% full with nearly 2TB free.
[6/3/2020 09:32:20] blue::> df -h xxxx_x_xx_xxxx -skip-snapshot-lines Filesystem total used avail capacity Mounted on Vserver /vol/xxxx_x_xx_xxxx/ 12TB 7421GB 5678GB 56% /xxxx_x_xx_xxxx
But it's actually about 99% full with ~210GB free.
Hello @EWILTS_SAS . Thanks for the reply. In my case both is-space-reporting-logical and is-space-enforcement-logical are false. Even if turn them to trues - usage percent remains the same. I read that it in that case space, saved by the storage efficiency features calculates as used space, but not Snapshot reserve.