make sure to ignore the rootDisk when healing drives (#13209)

fixes #13208
This commit is contained in:
Harshavardhana 2021-09-14 15:10:00 -07:00 committed by GitHub
parent d9eb962969
commit 787a72a993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1292,10 +1292,13 @@ func (s *erasureSets) HealFormat(ctx context.Context, dryRun bool) (res madmin.H
if s.erasureDisks[m][n] != nil {
s.erasureDisks[m][n].Close()
}
if storageDisks[index] != nil {
storageDisks[index].SetDiskLoc(s.poolIndex, m, n)
s.erasureDisks[m][n] = storageDisks[index]
s.endpointStrings[m*s.setDriveCount+n] = storageDisks[index].String()
}
}
// Replace reference format with what was loaded from disks.
s.format = refFormat