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

View File

@ -1292,9 +1292,12 @@ func (s *erasureSets) HealFormat(ctx context.Context, dryRun bool) (res madmin.H
if s.erasureDisks[m][n] != nil {
s.erasureDisks[m][n].Close()
}
storageDisks[index].SetDiskLoc(s.poolIndex, m, n)
s.erasureDisks[m][n] = storageDisks[index]
s.endpointStrings[m*s.setDriveCount+n] = storageDisks[index].String()
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.