juicedata/juicefs · warning
2. ALL entries in the metadata engine: %s
Error message
2. ALL entries in the metadata engine: %s
What it means
Second item of the 'juicefs destroy' destruction summary: it warns that ALL entries in the metadata engine will be deleted, showing the metadata URI with credentials stripped (utils.RemovePassword). After this, files are unrecoverable even if some objects remain in storage.
Source
Thrown at cmd/destroy.go:155
}
if num := len(sessions); num > 0 {
ss := make([][3]string, num)
for i, s := range sessions {
ss[i] = [3]string{strconv.FormatUint(s.Sid, 10), s.HostName, s.MountPoint}
}
logger.Fatalf("%d sessions are active, please disconnect them first:\n%s", num, printSessions(ss))
}
var totalSpace, availSpace, iused, iavail uint64
_ = m.StatFS(meta.Background(), meta.RootInode, &totalSpace, &availSpace, &iused, &iavail)
fmt.Printf(" volume name: %s\n", format.Name)
fmt.Printf(" volume UUID: %s\n", format.UUID)
fmt.Printf("data storage: %s\n", blob)
fmt.Printf(" used bytes: %d\n", totalSpace-availSpace)
fmt.Printf(" used inodes: %d\n", iused)
warn("The target volume will be permanently destroyed, including:")
warn("1. ALL objects in the data storage: %s", blob)
warn("2. ALL entries in the metadata engine: %s", utils.RemovePassword(uri))
if !ctx.Bool("yes") && !userConfirmed() {
logger.Fatalln("Aborted.")
}
}
objs, err := object.ListAll(ctx.Context, blob, "", "", true, false)
if err != nil && strings.Contains(err.Error(), "NoSuchBucket") {
if !ctx.Bool("force") {
logger.Fatalf("data storage %s does not exist (error: %v); retry with \"--force\" to skip object deletion", blob, err)
}
logger.Warnf("data storage %s does not exist (error: %v); will skip object deletion", blob, err)
} else {
if err != nil {
logger.Fatalf("list all objects: %s", err)
}
progress := utils.NewProgress(false)
spin := progress.AddCountSpinner("Deleted objects")
var failed intView on GitHub (pinned to c9a67b23e8)
Solutions
- Confirm the printed (password-stripped) metadata URI points at the intended engine
- Back up metadata first with 'juicefs dump META backup.json' if recovery might be needed
- Ensure no clients are still mounted, or they will error after metadata is wiped
Example fix
// before juicefs destroy redis://host:6379/1 $UUID --yes // after (dump backup first) juicefs dump redis://host:6379/1 /backup/meta.json && juicefs destroy redis://host:6379/1 $UUID --yes
Defensive patterns
Strategy: validation
Validate before calling
// Back up metadata before destroy
exec.Command("juicefs", "dump", metaURI, "backup.json").Run() Try / catch
if strings.Contains(out, "ALL entries in the metadata engine") && !backupExists { cancel() } Prevention
- Run 'juicefs dump' before any destroy
- Verify the metadata URI (password-stripped) is the intended engine
- Ensure no active sessions remain before wiping metadata
When it happens
Trigger: Confirmation output of 'juicefs destroy META UUID'; appears immediately before the interactive confirm unless --yes is given.
Common situations: Operators confirming destruction of a volume whose metadata (inodes, chunks, symlinks, xattrs) will be erased — e.g. cleaning a test Redis/SQL database that still hosts other keys or databases.
Related errors
- changelog is not enabled, use `juicefs config %s --changelog
- clone failed: %v
- compact [%d:%s] error: %s
- set tier for inode %d tier:%d failed: %w
- set tier for inode %d failed: %w
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/8317cba716b5efea.
Report an issue: GitHub.