juicedata/juicefs · warning
Aborted.
Error message
Aborted.
What it means
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.
Source
Thrown at cmd/config.go:468
if storage || tier {
blob, err := createStorage(*format)
if err != nil {
return err
}
if err = test(context.WithValue(context.Background(), object.TierKey{}, targetTierID), blob); err != nil {
return err
}
}
if quota {
var totalSpace, availSpace, iused, iavail uint64
_ = m.StatFS(meta.Background(), meta.RootInode, &totalSpace, &availSpace, &iused, &iavail)
usedSpace := totalSpace - availSpace
if format.Capacity > 0 && usedSpace >= format.Capacity ||
format.Inodes > 0 && iused >= format.Inodes {
warn("New quota is too small (used / quota): %d / %d bytes, %d / %d inodes.",
usedSpace, format.Capacity, iused, format.Inodes)
if !yes && !userConfirmed() {
return fmt.Errorf("Aborted.")
}
}
}
if trash && format.TrashDays == 0 {
warn("The current trash will be emptied and future removed files will purged immediately.")
if !yes && !userConfirmed() {
return fmt.Errorf("Aborted.")
}
}
if originDirStats && !format.DirStats {
qs := make(map[string]*meta.Quota)
err := m.HandleQuota(meta.Background(), meta.QuotaList, "", meta.DirQuotaType, qs, false, false, false)
if err != nil {
return errors.Wrap(err, "list quotas")
}
if len(qs) != 0 {
paths := make([]string, 0, len(qs))
for path := range qs {View on GitHub (pinned to c9a67b23e8)
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
Example fix
// before juicefs config META --capacity 1G # used 5G, prompts, aborts in script // after juicefs config META --capacity 10G --yes
Defensive patterns
Strategy: try-catch
Validate before calling
used=$(juicefs info META ...) ; [ "$used" -le "$NEW_CAP" ] || echo "quota smaller than usage; pass --yes or enlarge"
Try / catch
out=$(juicefs config META --capacity 1G 2>&1) || {
case "$out" in *Aborted*) echo "config not applied";; esac
} Prevention
- Pass --yes in non-interactive contexts
- Compare current usage to the new quota first
- Enlarge rather than shrink quotas in automation
When it happens
Trigger: 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.
Common situations: Cron/CI runs of `juicefs config` without --yes hitting the confirmation prompt; intentionally refusing an unsafe quota shrink; misreading the quota warning.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- cannot disable dir stats when there are still %d dir quotas:
- parse quota key %q: %s
- user/group quota is inconsistent, please repair it with --re
- New quota is too small (used / quota): %d / %d bytes, %d / %
- Unsupported ByteMultiple " + sMultiple
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/936a240e0dabbb1e.
Report an issue: GitHub.