2016-05-12 03:48 PM
Good day all, I'm simply using get-ncaggr | export-csv path to output my aggregate space. But, I've also noticed this discrepancy using get-ncvol | export-csv.
Problem, the console window output for my one of my root aggregates (as an example) shows TotalSize as 753.2 GB. When using export-csv, the value for TotalSize is 808747343872, which is the same output value as the AggregateSize when using Get-NcAggrSpace -Name aggr. So, it seems that TotalSize in the console window is different than TotalSize in the csv output, a completely different value, or they forget to carry the 1...???
Does anyone know the formula being used to translate "AggregateSize" to "TotalSize"? What value is AggregateSize provided in? According to my math, it's somwhere in the realm of /1074000000 to get close to the number provided in the console window, this doesn't sound right to me.
Thanks in advance!
Solved! SEE THE SOLUTION
2016-05-12 06:17 PM
The number in the CSV is in bytes, so you would divide by 1024 three times...e.g. "XXX / 1024 / 1024 / 1024", or 1073741824 (the number of bytes in a GiB)...to convert the value to GiB. The PowerShell Toolkit does this for you when it displays back the values to make them readable. Using the PowerShell Toolkit you can convert the value to a more friendly number using the "ConvertTo-FormattedNumber" cmdlet.
Hope that helps.