mirror of https://github.com/minio/minio.git
choose default values upon incorrect storage_class value (#16058)
This commit is contained in:
parent
6d76db9d6c
commit
962d1f1a71
|
@ -304,7 +304,12 @@ func LookupConfig(kvs config.KVS, setDriveCount int) (cfg Config, err error) {
|
|||
// Validation is done after parsing both the storage classes. This is needed because we need one
|
||||
// storage class value to deduce the correct value of the other storage class.
|
||||
if err = validateParity(cfg.Standard.Parity, cfg.RRS.Parity, setDriveCount); err != nil {
|
||||
return Config{}, err
|
||||
cfg.RRS.Parity = defaultRRSParity
|
||||
if setDriveCount == 1 {
|
||||
cfg.RRS.Parity = 0
|
||||
}
|
||||
cfg.Standard.Parity = DefaultParityBlocks(setDriveCount)
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
|
|
Loading…
Reference in New Issue