juicedata/juicefs · error

path is not a mount point

Error message

path %s is not a mount point

What it means

After looking up the mount point's inode, `juicefs debug` compares it with `meta.RootInode` of the volume. If they differ, the given path is inside the JuiceFS filesystem but is not the mount point itself, so the command aborts with this error.

Solutions

  1. Run `juicefs debug` with the actual mount point root (e.g. `/jfs`), not a subdirectory.
  2. Find the mount point with `mount | grep juicefs` or `df -T` and use that path.
  3. If a bind mount of a subdirectory is intended, debug via the original mount point instead.

Example fix

// before
$ juicefs debug /jfs/logs
// after (use the mount root)
$ juicefs debug /jfs
Defensive patterns

Strategy: validation

Validate before calling

func isMountRoot(mp string) bool {
  root, err := os.FindMountPoint(mp) // or compare with `mount` output
  return err == nil && root == mp
}
if !isMountRoot(mp) { return fmt.Errorf("%s is not a mount point root", mp) }

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Running `juicefs debug <path>` where `<path>` is a subdirectory or file inside a JuiceFS mount rather than the mount point root, so its inode != `meta.RootInode`.

Common situations: User passes a nested directory like `/jfs/logs` instead of the mount root `/jfs`; confusion between the FUSE mount point and a bind-mounted subdirectory.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at cmd/debug.go:520

	return nil
}

func debug(ctx *cli.Context) error {
	setup(ctx, 1)
	mp := ctx.Args().First()
	var inode uint64
	if err := utils.WithTimeout(context.TODO(), func(context.Context) error {
		var err error
		if inode, err = utils.GetFileInode(mp); err != nil {
			return fmt.Errorf("failed to lookup inode for %s: %s", mp, err)
		}
		return nil
	}, 3*time.Second); err != nil {
		logger.Warn(err.Error())
		logger.Warnf("assuming the mount point is JuiceFS mount point")
	} else {
		if inode != uint64(meta.RootInode) {
			return fmt.Errorf("path %s is not a mount point", mp)
		}
	}

	amp, err := filepath.Abs(mp)
	if err != nil {
		return fmt.Errorf("failed to get absolute path: %v", err)
	}
	timestamp := time.Now().Format("20060102150405")
	prefix := strings.Trim(strings.Join(strings.Split(amp, "/"), "-"), "-")
	if runtime.GOOS == "windows" {
		prefix = strings.ReplaceAll(prefix, ":", "")
	}
	outDir := ctx.String("out-dir")
	currDir := filepath.Join(outDir, fmt.Sprintf("%s-%s", prefix, timestamp))
	if err := os.MkdirAll(currDir, os.ModePerm); err != nil {
		return fmt.Errorf("failed to create current out dir %s: %v", currDir, err)
	}

View on GitHub (pinned to c9a67b23e8)