diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-16 06:22:50 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-16 06:22:50 -0800 |
| commit | ad70107eb4285f2d42ec011de7060b50ad1829b4 (patch) | |
| tree | 1dc35aef98f9ad4b6c11cc6e345b76447bcf2adb /weed/shell/command_ec_balance.go | |
| parent | 3097b9a9b7859dc41e9223df2ade8f21e3e6b3f6 (diff) | |
| download | seaweedfs-ad70107eb4285f2d42ec011de7060b50ad1829b4.tar.xz seaweedfs-ad70107eb4285f2d42ec011de7060b50ad1829b4.zip | |
ec balance among nodes with HDD
Diffstat (limited to 'weed/shell/command_ec_balance.go')
| -rw-r--r-- | weed/shell/command_ec_balance.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go index 2baadb144..b1ca926d5 100644 --- a/weed/shell/command_ec_balance.go +++ b/weed/shell/command_ec_balance.go @@ -326,7 +326,9 @@ func balanceEcShardsWithinRacks(commandEnv *CommandEnv, allEcNodes []*EcNode, ra var possibleDestinationEcNodes []*EcNode for _, n := range racks[RackId(rackId)].ecNodes { - possibleDestinationEcNodes = append(possibleDestinationEcNodes, n) + if _, found := n.info.DiskInfos[string(types.HardDriveType)]; found { + possibleDestinationEcNodes = append(possibleDestinationEcNodes, n) + } } sourceEcNodes := rackEcNodesWithVid[rackId] averageShardsPerEcNode := ceilDivide(rackToShardCount[rackId], len(possibleDestinationEcNodes)) |
