update grafana dashboard with disk -> drive rename (#17857)

This commit is contained in:
Harshavardhana
2023-08-15 16:04:20 -07:00
committed by GitHub
parent 21f0d6b549
commit 8a9b886011
11 changed files with 62 additions and 62 deletions
+2 -2
View File
@@ -172,8 +172,8 @@ var (
ErrStorageClassValue = newErrFn(
"Invalid storage class value",
"Please check the value",
`MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity disks for MinIO server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request
MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity disks for MinIO server in Reduced Redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class
`MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity drives for MinIO server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request
MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity drives for MinIO server in Reduced Redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class
Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storage-class for more information`,
)
+1 -1
View File
@@ -29,7 +29,7 @@ var (
Help = config.HelpKVS{
config.HelpKV{
Key: Bitrot,
Description: `perform bitrot scan on disks when checking objects during scanner` + defaultHelpPostfix(Bitrot),
Description: `perform bitrot scan on drives when checking objects during scanner` + defaultHelpPostfix(Bitrot),
Optional: true,
Type: "on|off",
},
+19 -19
View File
@@ -49,8 +49,8 @@ const (
// Supported storage class scheme is EC
schemePrefix = "EC"
// Min parity disks
minParityDisks = 0
// Min parity drives
minParityDrives = 0
// Default RRS parity is always minimum parity.
defaultRRSParity = 1
@@ -150,26 +150,26 @@ func parseStorageClass(storageClassEnv string) (sc StorageClass, err error) {
return StorageClass{}, config.ErrStorageClassValue(nil).Msg("Unsupported scheme " + s[0] + ". Supported scheme is EC")
}
// Number of parity disks should be integer
parityDisks, err := strconv.Atoi(s[1])
// Number of parity drives should be integer
parityDrives, err := strconv.Atoi(s[1])
if err != nil {
return StorageClass{}, config.ErrStorageClassValue(err)
}
if parityDisks < 0 {
if parityDrives < 0 {
return StorageClass{}, config.ErrStorageClassValue(nil).Msg("Unsupported parity value " + s[1] + " provided")
}
return StorageClass{
Parity: parityDisks,
Parity: parityDrives,
}, nil
}
// ValidateParity validate standard storage class parity.
func ValidateParity(ssParity, setDriveCount int) error {
// SS parity disks should be greater than or equal to minParityDisks.
// Parity below minParityDisks is not supported.
if ssParity > 0 && ssParity < minParityDisks {
// SS parity drives should be greater than or equal to minParityDrives.
// Parity below minParityDrives is not supported.
if ssParity > 0 && ssParity < minParityDrives {
return fmt.Errorf("parity %d should be greater than or equal to %d",
ssParity, minParityDisks)
ssParity, minParityDrives)
}
if ssParity > setDriveCount/2 {
@@ -179,19 +179,19 @@ func ValidateParity(ssParity, setDriveCount int) error {
return nil
}
// Validates the parity disks.
// Validates the parity drives.
func validateParity(ssParity, rrsParity, setDriveCount int) (err error) {
// SS parity disks should be greater than or equal to minParityDisks.
// Parity below minParityDisks is not supported.
if ssParity > 0 && ssParity < minParityDisks {
// SS parity drives should be greater than or equal to minParityDrives.
// Parity below minParityDrives is not supported.
if ssParity > 0 && ssParity < minParityDrives {
return fmt.Errorf("Standard storage class parity %d should be greater than or equal to %d",
ssParity, minParityDisks)
ssParity, minParityDrives)
}
// RRS parity disks should be greater than or equal to minParityDisks.
// Parity below minParityDisks is not supported.
if rrsParity > 0 && rrsParity < minParityDisks {
return fmt.Errorf("Reduced redundancy storage class parity %d should be greater than or equal to %d", rrsParity, minParityDisks)
// RRS parity drives should be greater than or equal to minParityDrives.
// Parity below minParityDrives is not supported.
if rrsParity > 0 && rrsParity < minParityDrives {
return fmt.Errorf("Reduced redundancy storage class parity %d should be greater than or equal to %d", rrsParity, minParityDrives)
}
if setDriveCount > 2 {
@@ -124,7 +124,7 @@ func TestValidateParity(t *testing.T) {
func TestParityCount(t *testing.T) {
tests := []struct {
sc string
disksCount int
drivesCount int
expectedData int
expectedParity int
}{
@@ -158,8 +158,8 @@ func TestParityCount(t *testing.T) {
scfg.Standard.Parity = 7
}
parity := scfg.GetParityForSC(tt.sc)
if (tt.disksCount - parity) != tt.expectedData {
t.Errorf("Test %d, Expected data drives %d, got %d", i+1, tt.expectedData, tt.disksCount-parity)
if (tt.drivesCount - parity) != tt.expectedData {
t.Errorf("Test %d, Expected data drives %d, got %d", i+1, tt.expectedData, tt.drivesCount-parity)
continue
}
if parity != tt.expectedParity {