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
Add warning with hints to why a EC shard cant be moved (#5790)
Dan794a5aa67de3
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.goindex 17ba63cfed..217e5750e1 100644--- a/weed/shell/command_ec_balance.go+++ b/weed/shell/command_ec_balance.go@@ -455,16 +455,20 @@ func doBalanceEcRack(commandEnv *CommandEnv, ecRack *EcRack, applyBalancing boolfunc pickOneEcNodeAndMoveOneShard(commandEnv *CommandEnv, averageShardsPerEcNode int, existingLocation *EcNode, collection string, vid needle.VolumeId, shardId erasure_coding.ShardId, possibleDestinationEcNodes []*EcNode, applyBalancing bool) error {sortEcNodesByFreeslotsDescending(possibleDestinationEcNodes)-+ skipReason := ""for _, destEcNode := range possibleDestinationEcNodes {+if destEcNode.info.Id == existingLocation.info.Id {continue}if destEcNode.freeEcSlot <= 0 {+ skipReason += fmt.Sprintf(" Skipping %s because it has no free slots\n", destEcNode.info.Id)continue}if findEcVolumeShards(destEcNode, vid).ShardIdCount() >= averageShardsPerEcNode {+ skipReason += fmt.Sprintf(" Skipping %s because it %d >= avernageShards (%d)\n",+ destEcNode.info.Id, findEcVolumeShards(destEcNode, vid).ShardIdCount(), averageShardsPerEcNode)continue}@@ -477,7 +481,7 @@ func pickOneEcNodeAndMoveOneShard(commandEnv *CommandEnv, averageShardsPerEcNodereturn nil}-+ fmt.Printf("WARNING: Could not find suitable taget node for %d.%d:\n%s", vid, shardId, skipReason)return nil}