diff options
Diffstat (limited to 'weed/shell/command_volume_balance.go')
| -rw-r--r-- | weed/shell/command_volume_balance.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index f440dc5d2..2a5731333 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -5,6 +5,7 @@ import ( "flag" "fmt" "io" + "math" "os" "sort" "time" @@ -186,7 +187,7 @@ func balanceSelectedVolume(commandEnv *commandEnv, nodes []*Node, sortCandidates selectedVolumeCount += len(dn.selectedVolumes) } - idealSelectedVolumes := selectedVolumeCount / len(nodes) + idealSelectedVolumes := int(math.Ceil(float64(selectedVolumeCount) / float64(len(nodes)))) hasMove := true |
