juicedata/juicefs · error

some errors occurred, please check the log of fsck

Error message

some errors occurred, please check the log of fsck

What it means

Generic aggregate error returned by fsck's metadata check: at least one inconsistency was found or a sub-step failed during the walk/sync (e.g. syncing used space), and details were already logged. The error itself carries no specifics; the fsck log lines identify the actual problems.

Source

Thrown at pkg/meta/base.go:2719

						}
					} else if statBroken {
						logger.Warnf("Stat of path %s (inode %d) should be synced, please re-run with '--path %s --repair --sync-dir-stat' to fix it", path, inode, path)
						hasError = true
					}
				}
				nodeBar.Increment()
			}
		}()
	}
	wg.Wait()
	if needSyncVolumeStat && !walkError {
		if err := m.syncVolumeStat(ctx, volumeUsed, volumeInodes); err != nil {
			logger.Errorf("Sync used space: %s", err)
			hasError = true
		}
	}
	if hasError || walkError {
		return errors.New("some errors occurred, please check the log of fsck")
	}

	if progress.Quiet {
		logger.Infof("Checked %d nodes", nodeBar.Current())
	}

	return nil
}

func (m *baseMeta) Chroot(ctx Context, subdir string) syscall.Errno {
	for subdir != "" {
		ps := strings.SplitN(subdir, "/", 2)
		if ps[0] != "" {
			var attr Attr
			var inode Ino
			r := m.Lookup(ctx, m.root, ps[0], &inode, &attr, true)
			if r == syscall.ENOENT {
				r = m.Mkdir(ctx, m.root, ps[0], 0777, 0, 0, &inode, &attr)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Re-run with verbose logging and read the full fsck log to identify each specific failed node or sync step.
  2. Fix the underlying issues reported (e.g. repair leaked blocks/inodes per fsck output, restore metadata connectivity).
  3. If sync used space failed, re-run fsck after the metadata engine is reachable so volume usage counters are corrected.
Defensive patterns

Strategy: try-catch

Try / catch

if err := fsck(ctx, meta); err != nil {
	if strings.Contains(err.Error(), "some errors occurred") {
		log.Println("fsck found issues; inspect log lines above for specifics")
	}
}

Prevention

When it happens

Trigger: Running `juicefs fsck` when walkError is non-nil (entry traversal failures), hasError from syncVolumeStat failures, or any per-node check that logged an error and set the flag.

Common situations: Corrupted or leaked inodes/blocks found by fsck; metadata engine connectivity issues mid-check causing volume-stat sync to fail; interrupted checks on large filesystems.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


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