From 9d50867d08557acf389878c6f42bd22d0c2cc709 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 14 Apr 2021 10:26:26 -0700 Subject: [PATCH] volume.tier.move: avoid data loss when destination volume server already has the volume fix https://github.com/chrislusf/seaweedfs/issues/2001 --- 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 f7fa94031..d6a49d6e1 100644 --- a/weed/shell/command_volume_tier_move.go +++ b/weed/shell/command_volume_tier_move.go @@ -133,7 +133,7 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, collection strin // remove the remaining replicas for _, loc := range locations { - if loc.Url != sourceVolumeServer { + if loc.Url != dst.dataNode.Id { if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil { fmt.Fprintf(writer, "failed to delete volume %d on %s\n", vid, loc.Url) }