Subscribe

Inccorect aggregate used size output from sdk for java

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

 

 

 

 

 

 

 

Re: Inccorect aggregate used size output from sdk for java

I just look at this on one of our filers and I compared the output of the API call, 'df -Ah' and 'aggr show_space'. What I see is that the API call and 'df' agree on the aggr size and 'used', whereas aggr show_space has a different value for 'used'.  I think what's happeneing here is that the API call and df are reporting the 'used' as what has been allocated to volumes, regardless of whether or not there is data taking up that space (perhaps allocated is a better term then used here). 'aggr show_space' is actually giving you a value of how much data is in the aggregate. Now this assume that we're talking about 'think' volumes (guarantee=volume), not sure how this would look if volume guarantees were disabled.

 

--rdp