juicedata/juicefs · error
load %v: %s
Error message
load %v: %s
What it means
Wraps errors from decodeEntry while `juicefs load` replays FSTree or Trash sections of a dump into the metadata engine in pkg/meta/dump.go. The message names the section being loaded plus the underlying error, so failures during entry decoding (bad inode, chunk refs, quota updates) surface here.
Source
Thrown at pkg/meta/dump.go:496
case "Sustained":
err = dec.Decode(&dm.Sustained)
case "DelFiles":
err = dec.Decode(&dm.DelFiles)
case "Quotas":
err = dec.Decode(&dm.Quotas)
case "UserQuotas":
err = dec.Decode(&dm.UserQuotas)
case "GroupQuotas":
err = dec.Decode(&dm.GroupQuotas)
case "ChangeLog":
err = dec.Decode(&dm.ChangeLog)
case "FSTree":
_, err = decodeEntry(dec, 0, counters, parents, dm.Quotas, refs, bar, load, addChunk)
case "Trash":
_, err = decodeEntry(dec, 1, counters, parents, nil, refs, bar, load, addChunk)
}
if err != nil {
err = fmt.Errorf("load %v: %s", name, err)
return
}
}
_, _ = dec.Token() // }
progress.Done()
if err = dm.validate(); err != nil {
return
}
logger.Infof("Dumped counters: %+v", *dm.Counters)
logger.Infof("Loaded counters: %+v", *counters)
return
}
func decodeEntry(dec *json.Decoder, parent Ino, cs *DumpedCounters, parents map[Ino][]Ino, quotas map[Ino]*DumpedQuota,
refs map[chunkKey]int64, bar *utils.Bar, load func(*DumpedEntry), addChunk func(*chunkKey)) (*DumpedEntry, error) {
if _, err := dec.Token(); err != nil {View on GitHub (pinned to c9a67b23e8)
Solutions
- Load into a freshly formatted, empty volume to avoid key conflicts
- Fix or re-generate the dump from the source engine; inspect the wrapped error after 'load FSTree:'/'load Trash:' for the root cause
- Verify dump/load tool versions match (same JuiceFS release) to avoid format drift
Defensive patterns
Strategy: retry
Validate before calling
// before load: confirm target volume is empty and version-compatible
meta, _ := juicefs.NewMetaClient(metaURL); if used, _ := meta.GetFormat(ctx); used != nil { /* load into a fresh volume */ } Try / catch
if err := juicefsLoad(dumpFile); err != nil { if strings.Contains(err.Error(), "load FSTree") || strings.Contains(err.Error(), "load Trash") { /* inspect wrapped cause; re-dump or use fresh volume */ } } Prevention
- Always load into a newly formatted empty volume
- Keep dump/load on the same JuiceFS version
- Check the wrapped cause after 'load <section>:' to diagnose the true failure
When it happens
Trigger: `juicefs load` on a dump whose FSTree/Trash entries are inconsistent: unknown chunk keys, invalid inode references, checksum/decode failures inside an entry, or target-engine rejects (e.g. duplicate keys on a non-empty volume).
Common situations: Loading a dump into a volume with pre-existing data (key conflicts), cross-version load where the dump format changed, corrupted dump entries.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- parse name: %s
- invalid dumped meta: missing 'Counters'
- The entry of the root inode was not found
- json: %s
- invalid dumped meta
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/cd7de277d0b45320.
Report an issue: GitHub.