mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
heal: Return parity for storage classes in heal info API (#13038)
`mc admin heal` command will show servers/disks tolerance, for that purpose, you need to know the number of parity disks for each storage class. Parity is always the same in all pools.
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/minio/internal/color"
|
||||
"github.com/minio/minio/internal/config/storageclass"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/minio/pkg/wildcard"
|
||||
@@ -133,6 +134,11 @@ func getBackgroundHealStatus(ctx context.Context, o ObjectLayer) (madmin.BgHealS
|
||||
return status.Sets[i].ID < status.Sets[j].ID
|
||||
})
|
||||
|
||||
backendInfo := o.BackendInfo()
|
||||
status.SCParity = make(map[string]int)
|
||||
status.SCParity[storageclass.STANDARD] = backendInfo.StandardSCParity
|
||||
status.SCParity[storageclass.RRS] = backendInfo.RRSCParity
|
||||
|
||||
return status, true
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user