From 9edd964627a1d0eb6549ab4eaab8e0191551c70a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 23 Feb 2021 03:49:14 -0800 Subject: [PATCH] volume.tier.move: avoid repeated move for replicated volumes fix https://github.com/chrislusf/seaweedfs/issues/1792#issuecomment-784139348 --- weed/shell/command_volume_tier_move.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.go index a15efd6b3..f7fa94031 100644 --- a/weed/shell/command_volume_tier_move.go +++ b/weed/shell/command_volume_tier_move.go @@ -102,7 +102,7 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, collection strin keepDataNodesSorted(allLocations, toDiskType) fn := capacityByFreeVolumeCount(toDiskType) for _, dst := range allLocations { - if fn(dst.dataNode) > 0 { + if fn(dst.dataNode) > 0 && !hasFoundTarget { // ask the volume server to replicate the volume if isOneOf(dst.dataNode.Id, locations) { continue