mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 06:17:56 +08:00
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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user