From 5acb4578abef9601bde1e764cc1da2a540c8b84c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 14 Mar 2026 16:18:29 -0700 Subject: [PATCH] Fix ec.rebuild failing on unrepairable volumes instead of skipping (#8632) * Fix ec.rebuild failing on unrepairable volumes instead of skipping them When an EC volume has fewer shards than DataShardsCount, ec.rebuild would return an error and abort the entire operation. Now it logs a warning and continues rebuilding the remaining volumes. Fixes #8630 * Remove duplicate volume ID in unrepairable log message --------- Co-authored-by: Copilot --- weed/shell/command_ec_rebuild.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go index 71e05893e..aa6fa0f81 100644 --- a/weed/shell/command_ec_rebuild.go +++ b/weed/shell/command_ec_rebuild.go @@ -231,12 +231,7 @@ func (erb *ecRebuilder) rebuildEcVolumes(collection string) { continue } if shardCount < erasure_coding.DataShardsCount { - // Capture variables for closure - vid := vid - shardCount := shardCount - erb.ewg.Add(func() error { - return fmt.Errorf("ec volume %d is unrepairable with %d shards", vid, shardCount) - }) + erb.write("ec volume %d is unrepairable with %d shards (need %d), skipping\n", vid, shardCount, erasure_coding.DataShardsCount) continue }