From dc4ed2cd9b66ea390aa5d295fe6b841c9e79a5b2 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 9 Feb 2023 22:17:54 -0800 Subject: [PATCH] do not move cloud tier volumes fix https://github.com/seaweedfs/seaweedfs/issues/4195 --- weed/shell/command_volume_balance.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index 3a9e7dea0..5380d5e63 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -329,6 +329,10 @@ func maybeMoveOneVolume(commandEnv *CommandEnv, volumeReplicas map[uint32][]*Vol return false, fmt.Errorf("lock is lost") } + if candidateVolume.RemoteStorageName != "" { + return false, nil + } + if candidateVolume.ReplicaPlacement > 0 { replicaPlacement, _ := super_block.NewReplicaPlacementFromByte(byte(candidateVolume.ReplicaPlacement)) if !isGoodMove(replicaPlacement, volumeReplicas[candidateVolume.Id], fullNode, emptyNode) {