mirror of
https://github.com/minio/minio.git
synced 2025-02-04 02:15:59 -05:00
fix: honor storage class uniformity for multiple pools (#11309)
This commit is contained in:
parent
19fb1086b2
commit
7624c8b9bb
@ -27,6 +27,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
humanize "github.com/dustin/go-humanize"
|
humanize "github.com/dustin/go-humanize"
|
||||||
|
"github.com/minio/minio/cmd/config"
|
||||||
"github.com/minio/minio/cmd/config/storageclass"
|
"github.com/minio/minio/cmd/config/storageclass"
|
||||||
"github.com/minio/minio/cmd/logger"
|
"github.com/minio/minio/cmd/logger"
|
||||||
"github.com/minio/minio/pkg/color"
|
"github.com/minio/minio/pkg/color"
|
||||||
@ -908,7 +909,8 @@ func getDefaultParityBlocks(drive int) int {
|
|||||||
// ecDrivesNoConfig returns the erasure coded drives in a set if no config has been set.
|
// ecDrivesNoConfig returns the erasure coded drives in a set if no config has been set.
|
||||||
// It will attempt to read it from env variable and fall back to drives/2.
|
// It will attempt to read it from env variable and fall back to drives/2.
|
||||||
func ecDrivesNoConfig(setDriveCount int) int {
|
func ecDrivesNoConfig(setDriveCount int) int {
|
||||||
ecDrives := globalStorageClass.GetParityForSC(storageclass.STANDARD)
|
sc, _ := storageclass.LookupConfig(config.KVS{}, setDriveCount)
|
||||||
|
ecDrives := sc.GetParityForSC(storageclass.STANDARD)
|
||||||
if ecDrives <= 0 {
|
if ecDrives <= 0 {
|
||||||
ecDrives = getDefaultParityBlocks(setDriveCount)
|
ecDrives = getDefaultParityBlocks(setDriveCount)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user