mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
Better reporting of total/free usable capacity of the cluster (#15230)
The current code uses approximation using a ratio. The approximation can skew if we have multiple pools with different disk capacities. Replace the algorithm with a simpler one which counts data disks and ignore parity disks.
This commit is contained in:
+2
-2
@@ -1903,12 +1903,12 @@ func getClusterStorageMetrics() *MetricsGroup {
|
||||
|
||||
metrics = append(metrics, Metric{
|
||||
Description: getClusterCapacityUsageBytesMD(),
|
||||
Value: GetTotalUsableCapacity(storageInfo.Disks, storageInfo),
|
||||
Value: float64(GetTotalUsableCapacity(storageInfo.Disks, storageInfo)),
|
||||
})
|
||||
|
||||
metrics = append(metrics, Metric{
|
||||
Description: getClusterCapacityUsageFreeBytesMD(),
|
||||
Value: GetTotalUsableCapacityFree(storageInfo.Disks, storageInfo),
|
||||
Value: float64(GetTotalUsableCapacityFree(storageInfo.Disks, storageInfo)),
|
||||
})
|
||||
|
||||
metrics = append(metrics, Metric{
|
||||
|
||||
Reference in New Issue
Block a user