Show the real disk usage in stats calls

Currently the file size of only one volume location is taken into
account in the stats. This commit multiplies the disk usages by the
amount of nodes holding a replica of the volume.
This will yield the expected amount of disk usage and matches the
total size calculations from before.
This commit is contained in:
Patrick Schmidt
2021-02-26 13:58:40 +01:00
parent c276117fef
commit 5f7b024891
3 changed files with 4 additions and 7 deletions

View File

@@ -432,7 +432,7 @@ func (vl *VolumeLayout) Stats() *VolumeLayoutStats {
if vl.readonlyVolumes.IsTrue(vid) {
ret.TotalSize += size
} else {
ret.TotalSize += vl.volumeSizeLimit
ret.TotalSize += vl.volumeSizeLimit * uint64(vll.Length())
}
}