juicedata/juicefs · error
entry %d/%d not found
Error message
entry %d/%d not found
What it means
During path reconstruction, after listing the parent directory no entry with the target inode was found (name stayed empty), so the path cannot be completed. This means the inode is not linked in its recorded parent — an orphaned or unlinked inode.
Source
Thrown at pkg/meta/base.go:2384
if attr.Typ != TypeDirectory {
return "", fmt.Errorf("inode %d is not a directory", ino)
}
var entries []*Entry
if st := m.en.doReaddir(ctx, attr.Parent, 0, &entries, -1); st != 0 {
return "", fmt.Errorf("readdir inode %d: %s", ino, st)
}
var name string
for _, e := range entries {
if e.Inode == ino {
name = string(e.Name)
break
}
}
if attr.Parent == RootInode && ino == TrashInode {
name = TrashName
}
if name == "" {
return "", fmt.Errorf("entry %d/%d not found", attr.Parent, ino)
}
names = append(names, name)
ino = attr.Parent
}
if m.root != RootInode && ino == RootInode {
return outside, nil
}
names = append(names, "/") // add root
for i, j := 0, len(names)-1; i < j; i, j = i+1, j-1 { // reverse
names[i], names[j] = names[j], names[i]
}
return path.Join(names...), nil
}
var paths []string
// inode != RootInode, parent is the real parent inode
for parent, count := range m.GetParents(ctx, inode) {View on GitHub (pinned to c9a67b23e8)
Solutions
- Re-resolve the file by path after confirming it still exists; the old inode is unlinked
- Handle the race gracefully in application code (deleted-while-open is normal POSIX behavior)
- If no deletion happened, inspect the metadata engine for dentry/parent inconsistency (fsck)
Defensive patterns
Strategy: fallback
Validate before calling
var entries []*meta.Entry
if st := meta.Readdir(ctx, parent, 0, &entries, -1); st != 0 { return st }
found := false
for _, e := range entries {
if e.Inode == ino { found = true; break }
}
if !found { /* inode unlinked; re-resolve or fail gracefully */ } Try / catch
name, err := fs.GetPath(ino)
if err != nil {
// fall back to re-opening by recorded path or treat as deleted
} Prevention
- Expect deleted-while-open semantics: an open handle does not guarantee a name exists
- Minimize concurrent rm/rename with path-resolution code paths
- Verify trash configuration if relying on trash-inode lookups
When it happens
Trigger: doReaddir on attr.Parent returned entries but none had e.Inode == ino; happens when the dentry was removed (file unlinked) while the walk still references the inode, or when metadata dentry/parent pointers are inconsistent.
Common situations: Open file handle whose name was deleted while in use; concurrent rm/rename racing with path resolution; trash-inode special case mismatches; metadata corruption after crash.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- getattr inode %d: %s
- inode %d is not a directory
- readdir inode %d: %s
- invalid dumped meta: missing 'Counters'
- The entry of the root inode was not found
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/4608fb961c6b9749.
Report an issue: GitHub.