Add active disk health checks (#17539)

Add check every 2 minutes to see if a write+read operation can complete.

If disk is unresponsive for 2 minutes or returns errFaultyDisk, take it offline.
This commit is contained in:
Klaus Post
2023-07-13 11:41:55 -07:00
committed by GitHub
parent 183428db03
commit 4f89e5bba9
5 changed files with 89 additions and 6 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ func TestFixFormatV3(t *testing.T) {
}
endpoints := mustGetNewEndpoints(0, erasureDirs...)
storageDisks, errs := initStorageDisksWithErrors(endpoints, true)
storageDisks, errs := initStorageDisksWithErrors(endpoints, false)
for _, err := range errs {
if err != nil && err != errDiskNotFound {
t.Fatal(err)
@@ -559,7 +559,7 @@ func benchmarkInitStorageDisksN(b *testing.B, nDisks int) {
b.RunParallel(func(pb *testing.PB) {
endpoints := endpoints
for pb.Next() {
initStorageDisksWithErrors(endpoints, true)
initStorageDisksWithErrors(endpoints, false)
}
})
}