diff --git a/cmd/background-newdisks-heal-ops.go b/cmd/background-newdisks-heal-ops.go index c985b4621..70cdb44ad 100644 --- a/cmd/background-newdisks-heal-ops.go +++ b/cmd/background-newdisks-heal-ops.go @@ -347,7 +347,7 @@ func initAutoHeal(ctx context.Context, objAPI ObjectLayer) { globalBackgroundHealState.pushHealLocalDisks(getLocalDisksToHeal()...) - if env.Get("_MINIO_AUTO_DISK_HEALING", config.EnableOn) == config.EnableOn { + if env.Get("_MINIO_AUTO_DRIVE_HEALING", config.EnableOn) == config.EnableOn || env.Get("_MINIO_AUTO_DISK_HEALING", config.EnableOn) == config.EnableOn { go monitorLocalDisksAndHeal(ctx, z) } } diff --git a/cmd/common-main.go b/cmd/common-main.go index 5c7f18b01..224e86c3e 100644 --- a/cmd/common-main.go +++ b/cmd/common-main.go @@ -664,10 +664,14 @@ func handleCommonEnvVars() { logger.Fatal(config.ErrInvalidFSOSyncValue(err), "Invalid MINIO_FS_OSYNC value in environment variable") } - if rootDiskSize := env.Get(config.EnvRootDiskThresholdSize, ""); rootDiskSize != "" { + rootDiskSize := env.Get(config.EnvRootDriveThresholdSize, "") + if rootDiskSize == "" { + rootDiskSize = env.Get(config.EnvRootDiskThresholdSize, "") + } + if rootDiskSize != "" { size, err := humanize.ParseBytes(rootDiskSize) if err != nil { - logger.Fatal(err, fmt.Sprintf("Invalid %s value in environment variable", config.EnvRootDiskThresholdSize)) + logger.Fatal(err, fmt.Sprintf("Invalid %s value in root drive threshold environment variable", rootDiskSize)) } globalRootDiskThreshold = size } diff --git a/cmd/xl-storage-disk-id-check.go b/cmd/xl-storage-disk-id-check.go index 7720e3b6c..1e8d22926 100644 --- a/cmd/xl-storage-disk-id-check.go +++ b/cmd/xl-storage-disk-id-check.go @@ -725,7 +725,10 @@ var diskMaxTimeout = 2 * time.Minute var diskActiveMonitoring = true func init() { - s := env.Get("_MINIO_DISK_MAX_CONCURRENT", "") + s := env.Get("_MINIO_DRIVE_MAX_CONCURRENT", "") + if s == "" { + s = env.Get("_MINIO_DISK_MAX_CONCURRENT", "") + } if s != "" { diskMaxConcurrent, _ = strconv.Atoi(s) if diskMaxConcurrent <= 0 { @@ -734,7 +737,10 @@ func init() { } } - d := env.Get("_MINIO_DISK_MAX_TIMEOUT", "") + d := env.Get("_MINIO_DRIVE_MAX_TIMEOUT", "") + if d == "" { + d = env.Get("_MINIO_DISK_MAX_TIMEOUT", "") + } if d != "" { timeoutOperation, _ := time.ParseDuration(d) if timeoutOperation < time.Second { @@ -744,7 +750,8 @@ func init() { } } - diskActiveMonitoring = env.Get("_MINIO_DISK_ACTIVE_MONITORING", config.EnableOn) == config.EnableOn + diskActiveMonitoring = (env.Get("_MINIO_DRIVE_ACTIVE_MONITORING", config.EnableOn) == config.EnableOn) || + (env.Get("_MINIO_DISK_ACTIVE_MONITORING", config.EnableOn) == config.EnableOn) diskStartChecking = 16 + diskMaxConcurrent/8 if diskStartChecking > diskMaxConcurrent { diff --git a/internal/config/constants.go b/internal/config/constants.go index 1ed41f501..c891892a9 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -63,7 +63,8 @@ const ( EnvMinIOServerURL = "MINIO_SERVER_URL" EnvBrowserRedirectURL = "MINIO_BROWSER_REDIRECT_URL" - EnvRootDiskThresholdSize = "MINIO_ROOTDISK_THRESHOLD_SIZE" + EnvRootDriveThresholdSize = "MINIO_ROOTDRIVE_THRESHOLD_SIZE" + EnvRootDiskThresholdSize = "MINIO_ROOTDISK_THRESHOLD_SIZE" // Deprecated Sep 2023 EnvBrowserLoginAnimation = "MINIO_BROWSER_LOGIN_ANIMATION" EnvBrowserSessionDuration = "MINIO_BROWSER_SESSION_DURATION"