Hello,
On my NetApp cluster (running NetApp Release 9.13.1P1: Tue Jul 25 10:19:28 UTC 2023) , I do a simple
::> volume snapshot show -vserver my_vserver -volume my_volume -snapshot snapscript_24092024_121002_164_8035 -fields size
vserver volume snapshot size
---------- --------- ----------------------------------- -------
my_vserver my_volume snapscript_24092024_121002_164_8035 135.9MB
So, the size of my snapshot is reported as 135.9MB
Then, I'm using a python client (netapp_ontap-9.12.1.0) to fetch that same value:
from netapp_ontap.resources import Snapshot as NetAppSnapshot
// get netapp_volume_uuid
netapp_snapshot_dict = NetAppSnapshot.find(netapp_volume_uuid, name="snapscript_24092024_121002_164_8035")
snapshot["name"] = netapp_snapshot_dict["name"]
snapshot["size"] = netapp_snapshot_dict.get("size", "not_supported")
and printing snapshot["size"] gives me 339496960.
Looking at the relevant documentation:
https://docs.netapp.com/us-en/ontap-restmap-9121//snapshot.html#snapshot-get-iter
and specifically on GET /api/storage/volumes/{volume.uuid}/snapshots/{uuid} which is being used here, I see that the value of size is in bytes.
But 339496960 bytes equals to ~339MB. which is way different than the value I got from the cluster.
Any idea what's going on here?
Thanks a lot in advance!