{"record":{"id":"936a240e0dabbb1e","repo":"juicedata/juicefs","slug":"aborted-936a24","errorCode":null,"errorMessage":"Aborted.","messagePattern":"Aborted\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/config.go","lineNumber":468,"sourceCode":"\t\tif storage || tier {\n\t\t\tblob, err := createStorage(*format)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err = test(context.WithValue(context.Background(), object.TierKey{}, targetTierID), blob); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif quota {\n\t\t\tvar totalSpace, availSpace, iused, iavail uint64\n\t\t\t_ = m.StatFS(meta.Background(), meta.RootInode, &totalSpace, &availSpace, &iused, &iavail)\n\t\t\tusedSpace := totalSpace - availSpace\n\t\t\tif format.Capacity > 0 && usedSpace >= format.Capacity ||\n\t\t\t\tformat.Inodes > 0 && iused >= format.Inodes {\n\t\t\t\twarn(\"New quota is too small (used / quota): %d / %d bytes, %d / %d inodes.\",\n\t\t\t\t\tusedSpace, format.Capacity, iused, format.Inodes)\n\t\t\t\tif !yes && !userConfirmed() {\n\t\t\t\t\treturn fmt.Errorf(\"Aborted.\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif trash && format.TrashDays == 0 {\n\t\t\twarn(\"The current trash will be emptied and future removed files will purged immediately.\")\n\t\t\tif !yes && !userConfirmed() {\n\t\t\t\treturn fmt.Errorf(\"Aborted.\")\n\t\t\t}\n\t\t}\n\t\tif originDirStats && !format.DirStats {\n\t\t\tqs := make(map[string]*meta.Quota)\n\t\t\terr := m.HandleQuota(meta.Background(), meta.QuotaList, \"\", meta.DirQuotaType, qs, false, false, false)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrap(err, \"list quotas\")\n\t\t\t}\n\t\t\tif len(qs) != 0 {\n\t\t\t\tpaths := make([]string, 0, len(qs))\n\t\t\t\tfor path := range qs {","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/config.go#L450-L486","documentation":"When `juicefs config` shrinks capacity/inode quotas below current usage, it prints a warning and asks for interactive confirmation. Declining (or answering non-interactively without `--yes`) aborts with 'Aborted.' and no changes are applied.","triggerScenarios":"Setting --capacity/--inodes below used space or inode count and answering 'no' at the prompt, or running non-interactively (piped/cron) without --yes so userConfirmed() fails.","commonSituations":"Cron/CI runs of `juicefs config` without --yes hitting the confirmation prompt; intentionally refusing an unsafe quota shrink; misreading the quota warning.","solutions":["Re-run with `--yes` if you really accept the small quota","Choose a quota larger than current usage to avoid the prompt","In non-interactive contexts, always pass --yes or skip the change"],"exampleFix":"// before\njuicefs config META --capacity 1G   # used 5G, prompts, aborts in script\n// after\njuicefs config META --capacity 10G --yes","handlingStrategy":"try-catch","validationCode":"used=$(juicefs info META ...) ; [ \"$used\" -le \"$NEW_CAP\" ] || echo \"quota smaller than usage; pass --yes or enlarge\"","typeGuard":null,"tryCatchPattern":"out=$(juicefs config META --capacity 1G 2>&1) || {\n  case \"$out\" in *Aborted*) echo \"config not applied\";; esac\n}","preventionTips":["Pass --yes in non-interactive contexts","Compare current usage to the new quota first","Enlarge rather than shrink quotas in automation"],"tags":["cli","confirmation","quota"],"backgroundTag":"missing-required-flag","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}