fix: skip disks that are offline when healing the drives (#12931)

This commit is contained in:
Harshavardhana 2021-08-11 12:57:18 -07:00 committed by GitHub
parent 3becee9e5d
commit 9e88941515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -705,8 +705,10 @@ func saveUnformattedFormat(ctx context.Context, storageDisks []StorageAPI, forma
if format == nil {
continue
}
if err := saveFormatErasure(storageDisks[index], format, true); err != nil {
return err
if storageDisks[index] != nil && storageDisks[index].IsOnline() {
if err := saveFormatErasure(storageDisks[index], format, true); err != nil {
return err
}
}
}
return nil