we are trying to automate quota assignment on qtrees and to do so, we need to get first some figures about volume occupancy (newbie - very first program). We are ontapi 1.9 7-mode and I managed to get almost all data that we need except snapshot occupancy.
This is the output of df in the column used for a volume
There are a number of gaps in the SDK coverage. This has been the case for years and contunies to be frustrating. I've never managed to get a comittment from NetApp to fix the gaps.
To avoid falling back to an alternate conneciton method you can send CLI commands over the existing HTTP(S) connection using a NaElelemt type 'system-cli'. I have no idea if this is supported or not, but I use it extensively to plug gaps in the SDK.
this is an exmple method from my OO API. I don't know your coding style (and this page will kill my indentation, so ignore that) but you should get the idea.
If you don't want to use the, for all intents and purposes, hidden, system-cli element, you can get what you are looking for with a little bit of collection and math.
snapshot-list-info returns 'total', the total number of 1024 byte blocks in a snapshot.
volume-list-info returns 'size-total', the total useable size in bytes of the volume (not including WAFL reserve or snapshot reserve). If you are using snap reserve, you'll have to take into accout the 'snapshot-blocks-reserve' value.
Perhaps I am missing how to get the information, I tried to collect it from snapshot-list-info and getting the info not with total but wiht cumulative-total . It just gives me a value that it does not match with df output:
<!-- last snapshot --> <total>84</total> <cumulative-total>1676</cumulative-total> while df gives me:
I'd appreciate if you could explain me a bit more how to do the math with the data, I'd indeed prefer to use the sdk methods instead of the ssh backdoor. Basically I want to get 28528 to substract to the volume reserved space, and this becomes the snap_delta, which cannot be shown as free to the end user. (Final goal is that this advanced users handle quotas themselfs, and this is to create proper limits) I am not a Netapp admin, but my colleagues have also told me that perhaps this snapshot-list-info is based on snap list and if so, it can cause performance problems on big systems.