Hi Folks,
I have been trying out the sdk to gather info on my filers and ran accross an issue with the output that the 8.1.3 API is returning.
From the java docs:
getSizeUsed
public BigInteger getSizeUsed()
Aggregate bytes used. This value is not returned if the aggregate is unusable (i.e., it's offline). Range: [0..2^64-1].
My code:
AggrListInfoRequest aggrListReq = new AggrListInfoRequest ();
AggrListInfoResponse aggrListResp = runner.run(aggrListReq);
List<AggrInfo> aggrList = aggrListResp.getAggregates();
for (AggrInfo aggr : aggrList)
{
System.out.println("Aggr Total : "+ aggr.getSizeTotal() ); //not including WAFL
System.out.println("Aggr Used : "+ aggr.getSizeUsed() );
}
My Code Outputs:
Aggregate Name : Aggr1
Aggr Total : 43333962539008
Aggr Used : 29979080327168
Aggregate Name : Aggr2
Aggr Total : 46390407385088
Aggr Used : 22164532269056
Comparing this result with the aggr show_space on the filer I get the same for Aggr Total size but both aggr used sizes do not match. Instead, it seems the API is reporting total space allocated instead of used. I guess I can iterate through each volume used data and sum it instead however, the java doc above is a bit misleading.
Aggregate 'Aggr1'
Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape
47020358656KB 4702035864KB 0KB 42318322792KB 0KB 167585188KB 0KB
Allocated Used Avail
Total space 29107389348KB 17085169132KB 13041879208KB
Aggregate 'Aggr2'
Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape
50336813568KB 5033681356KB 0KB 45303132212KB 0KB 144534916KB 0KB
Space allocated to volumes in the aggregate
XXXXX
Allocated Used Avail
Total space 21499257532KB 14664465048KB 23658081380KB