juicedata/juicefs · error

no quota for inode path

Error message

no quota for inode %d path %s

What it means

Raised by baseMeta.checkDirUsage (pkg/meta/quota.go:938) during `juicefs quota check` when doGetQuota returns no quota record for the given inode (directory quota key). It means the quota check was asked to verify a directory that has no quota set in the metadata engine. The check aborts for that path because there is nothing to compare usage against.

Solutions

  1. Verify the directory actually has a quota: run `juicefs quota list` or `juicefs quota get <path>`; if absent, set one with `juicefs quota set` before checking.
  2. Re-run the check against the correct quota'd path (check for typos / wrong mount root).
  3. If the quota was intentionally removed, ignore the error — check was started for a stale target.
  4. Retry if removal raced with the check; run check again when no quota mutations are in flight.

Example fix

// before: quota check on a dir without quota fails
$ juicefs quota check /mnt/jfs/data
// after: ensure the quota exists first
$ juicefs quota set /mnt/jfs/data --capacity 100G
$ juicefs quota check /mnt/jfs/data
Defensive patterns

Strategy: validation

Validate before calling

// ensure a quota exists before running quota check
q, err := meta.GetQuota(ctx, meta.DirQuotaType, uint64(ino))
if err != nil { return err }
if q == nil { return fmt.Errorf("no quota on inode %d; set one with `juicefs quota set` first", ino) }

Prevention

When it happens

Trigger: Running `juicefs quota check <path>` (or the internal handleQuotaCheck path) for a directory inode whose dir-quota record was deleted concurrently (e.g. `juicefs quota remove`) or never existed, so doGetQuota returns (nil, nil).

Common situations: Quota removed by another admin while a check was running; typo in the path so it resolves to an un-quota'd directory; stale cached inode/path mapping after the quota was deleted; running check on a path with only a user/group quota but no directory quota.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/e555bcda3076530b. Report an issue: GitHub.

Appendix: source

Thrown at pkg/meta/quota.go:938

		}
	}
	return nil
}

func (m *baseMeta) handleQuotaCheck(ctx Context, qtype uint32, key uint64, dpath string, strict, repair bool, quotas map[string]*Quota) error {
	if qtype == UserQuotaType || qtype == GroupQuotaType {
		return m.checkUGUsage(ctx, repair, quotas)
	}
	return m.checkDirUsage(ctx, qtype, key, dpath, strict, repair, quotas)
}

func (m *baseMeta) checkDirUsage(ctx Context, qtype uint32, key uint64, dpath string, strict, repair bool, quotas map[string]*Quota) error {
	q, err := m.en.doGetQuota(ctx, qtype, key)
	if err != nil {
		return err
	}
	if q == nil {
		return fmt.Errorf("no quota for inode %d path %s", key, dpath)
	}

	var sum Summary
	if st := m.GetSummary(ctx, Ino(key), &sum, true, strict); st != 0 {
		return st
	}

	usedInodes := int64(sum.Dirs+sum.Files) - 1
	usedSpace := int64(sum.Size) - align4K(0) // quota ignore root dir

	if q.UsedInodes == usedInodes && q.UsedSpace == usedSpace {
		logger.Infof("quota of %s is consistent", dpath)
		quotas[dpath] = q
		return nil
	}

	logger.Warnf(
		"%s: quota(%s, %s) != summary(%s, %s)", dpath,

View on GitHub (pinned to c9a67b23e8)