SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
shell: volume.tier.move avoid moving all volumes to one destination
Chris Lu26c222f59684
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.goindex 7e7c0a93db..326cb2a405 100644--- a/weed/shell/command_volume_fix_replication.go+++ b/weed/shell/command_volume_fix_replication.go@@ -195,6 +195,8 @@ func (c *commandVolumeFixReplication) fixOneUnderReplicatedVolume(commandEnv *Cofmt.Fprintf(writer, "replicating volume %d %s from %s to dataNode %s ...\n", replica.info.Id, replicaPlacement, replica.location.dataNode.Id, dst.dataNode.Id)if !takeAction {+ // adjust free volume count+ dst.dataNode.DiskInfos[replica.info.DiskType].FreeVolumeCount--break}diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.goindex 19a515dabf..355063dede 100644--- a/weed/shell/command_volume_tier_move.go+++ b/weed/shell/command_volume_tier_move.go@@ -122,6 +122,8 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, vid needle.VolumhasFoundTarget = trueif !applyChanges {+ // adjust volume count+ dst.dataNode.DiskInfos[string(toDiskType)].VolumeCount++break}@@ -133,6 +135,9 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, vid needle.Volumreturn fmt.Errorf("move volume %d %s => %s : %v", vid, locations[0].Url, dst.dataNode.Id, err)}+ // adjust volume count+ dst.dataNode.DiskInfos[string(toDiskType)].VolumeCount+++// remove the remaining replicasfor _, loc := range locations {if loc.Url != dst.dataNode.Id {