From ad70107eb4285f2d42ec011de7060b50ad1829b4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 16 Feb 2021 06:22:50 -0800 Subject: [PATCH] ec balance among nodes with HDD --- weed/shell/command_ec_balance.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))