Is there a property or method that outputs the vSAN Dedup & compression savings from a cluster?
I couldn't find anything that corresponds to vSAN compression in the
$cluster.ExtensionData
I suspect the following might provide the data to calculate those savings.
Can't really test since I'm not using dedup nor compression.
$clusterName = 'cluster'
$cluster = Get-Cluster -Name $clusterName
$vdMgmt = Get-VsanView -Id VimClusterVsanVcDiskManagementSystem-vsan-disk-management-system
$vdMgmt.QueryClusterDataEfficiencyCapacityState($cluster.ExtensionData.MoRef) | Format-Custom
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
These values appear to be in bytes. They don't show the savings capacity and the ratio.
Thanks @LucD for checking this for me though.
Isn't it just a matter of doing the percentage calculation?
(LogicalCapacityUsed - PhysicalCapacityUsed) / LogicalCapacityUsed
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
"(LogicalCapacityUsed - PhysicalCapacityUsed) / LogicalCapacityUsed" gives me 0.15680954964731416169289202387412 (160.57 GB), unless I’m very much mistaken. I'm trying to understand how does this value reflect the compression and/or saving ratio in the UI. I'm sure I'm missing something. Would you mind telling me if you see a problem?
LogicalCapacityUsed = 222913884816664 bytes (202.73 TB)
PhysicalCapacityUsed = 187958572722320 bytes (170.94 TB)
(202.73 TB -170.94 TB) / 202.73 TB = 160.57 GB
I'm not sure how you did that calculation, but on my calculator
(202-170)/170 = 0.15
Which I interpret as a 15% storage won by using compression and deduplication.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference