Get-NaAggrSpace doesn't show space used by WAFL or Snapshot reserve in the aggregate.
I can get the aggregate snapshot reserve in powershell by using the Get-NaSnapshotReserve cmdlet
I cant see a cmdlet that gives me the WAFL reserve amount - from calculations on aggregate on 1 of our filers it looks like it is 10% of the aggregate.
Before I code a 10% size adjustment to into my script - Is the WAFL reserve always 10% of the aggregate size regardless of the version of Data OnTap?
WAFL reserve space seems to be around 10% but you can calculate it. Aggregate space calcs are a little more involved and require data points from multiple APIs to get everything you seek. From the API docs:
(Get-NaDisk).PhysicalSpace --> Use to get total aggregate size (multiply by number of data disks in aggregate (don't count parity disks))
(Get-NaAggrSpace).SizeNominal --> Total space contained in the aggregate minus the WAFL reserve
Given these definitions, you should be able to determine the WAFL reserve. And given a few other things you should be able to calculate everything:
(Get-NaAggr).SizeTotal --> Aggregate total usable size in bytes, not including WAFL reserve and aggregate snapshot reserve
I would prefer everything be in one structure, but I would hesitate to do that in the Toolkit as it would entail multiple API calls for each aggregate and would slow the process even when those values aren't of interest.
When you do an aggr show_space you get "Total space", "WAFL reserve", "Snap reserve", and "Usable space" (among other things). The (Get-NaAggrSpace).SizeNominal value is equal to the "Usable space" value plus the "Snap reserve" value. To verify, you can try something like this: