juicedata/juicefs · warning
The target volume will be permanently destroyed, including:
Error message
The target volume will be permanently destroyed, including:
What it means
The 'juicefs destroy' command prints a final warning that the target volume will be permanently destroyed before asking for confirmation. Destruction removes all objects in the object storage and all metadata records; it cannot be undone.
Source
Thrown at cmd/destroy.go:153
if err != nil {
logger.Fatalf("list sessions: %s", err)
}
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)View on GitHub (pinned to c9a67b23e8)
Solutions
- Verify the volume name, UUID, and metadata URI shown before confirming
- Use --yes only in scripted, verified teardown flows
- Ensure all clients are unmounted ('juicefs status META' to list sessions) before destroying
- Back up metadata ('juicefs dump') if any chance of recovery is desired
Example fix
// before juicefs destroy sqlite3://test.db e59df596-.... // after (explicit confirmation, no interactive prompt) juicefs destroy --yes sqlite3://test.db e59df596-.... # only after verifying UUID
Defensive patterns
Strategy: validation
Validate before calling
st, _ := juicefsStatus(metaURI)
if st.Name != expectedName || st.UUID != expectedUUID { abort() } Try / catch
cmd := exec.Command("juicefs", "destroy", meta, uuid)
out, err := cmd.CombinedOutput()
if err != nil || strings.Contains(string(out), "Aborted") { /* not destroyed */ } Prevention
- Always verify volume UUID/name before destroying
- Use --yes only in verified automation
- Dump metadata as a backup before destruction
- Unmount all clients first
When it happens
Trigger: Running 'juicefs destroy META UUID' for a volume; the warning appears after printing volume name/UUID/storage/usage and before userConfirmed() unless --yes is passed.
Common situations: Decommissioning test volumes; cleaning up abandoned volumes after failed experiments; accidentally targeting a production volume by copying the wrong UUID or metadata URL.
Related errors
- The current trash will be emptied and future removed files w
- 1. ALL objects in the data storage: %s
- 2. ALL entries in the metadata engine: %s
- Unsupported ByteMultiple " + sMultiple
- wrong type
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/8e0dfde5dfa40430.
Report an issue: GitHub.