mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
Use maximum parity for config files (#11740)
Some deployments have low parity (EC:2), but we really do not need to save our config data with the same parity configuration. N/2 would be better to keep MinIO configurations intact when unexpected a number of drives fail.
This commit is contained in:
1 parent
57f3ed22d4
commit
eac66e67ec
3 files changed
+12
-5
No files matched your search
@@ -624,10 +624,13 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
||||
|
||||
storageDisks := er.getDisks()
|
||||
|
||||
// Get parity and data drive count based on storage class metadata
|
||||
parityDrives := globalStorageClass.GetParityForSC(opts.UserDefined[xhttp.AmzStorageClass])
|
||||
if parityDrives <= 0 {
|
||||
parityDrives = er.defaultParityCount
|
||||
parityDrives := len(storageDisks) / 2
|
||||
if !opts.MaxParity {
|
||||
// Get parity and data drive count based on storage class metadata
|
||||
parityDrives = globalStorageClass.GetParityForSC(opts.UserDefined[xhttp.AmzStorageClass])
|
||||
if parityDrives <= 0 {
|
||||
parityDrives = er.defaultParityCount
|
||||
}
|
||||
}
|
||||
dataDrives := len(storageDisks) - parityDrives
|
||||
|
||||
|
||||
Reference in new issue
Block a user