After healing re-load disks with the new format (#5718)

This PR also fixes correct calculation of drive states
before and after healing of objects.

Fixes #5700
Fixes #5708
This commit is contained in:
Harshavardhana
2018-03-27 18:11:39 -07:00
committed by Nitish Tiwari
parent 76d1e8bbcd
commit 6e9c853312
3 changed files with 46 additions and 30 deletions

View File

@@ -197,6 +197,12 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
// This is the number of drives we report free and total space for
availableDataDisks := uint64(onlineDisks - sscParity)
// Available data disks can be zero when onlineDisks is equal to parity,
// at that point we simply choose online disks to calculate the size.
if availableDataDisks == 0 {
availableDataDisks = uint64(onlineDisks)
}
// Return calculated storage info, choose the lowest Total and
// Free as the total aggregated values. Total capacity is always
// the multiple of smallest disk among the disk list.