juicedata/juicefs · error

%s is not inside JuiceFS

Error message

%s is not inside JuiceFS

What it means

findMountpoint walks ancestor paths looking for one whose inode equals the JuiceFS root inode (inode 1). If it reaches '/' without finding it, the given path is not inside any JuiceFS mount, and clone/bench refuse to proceed because the operation can only be dispatched to a JuiceFS control file.

Source

Thrown at cmd/clone.go:170

		bar.SetTotal(int64(total))
		bar.SetCurrent(int64(count))
	}); errno != 0 {
		return fmt.Errorf("clone failed: %v", errno)
	}
	return nil
}

func findMountpoint(fpath string) (string, error) {
	for p := fpath; p != "/"; p = filepath.Dir(p) {
		inode, err := utils.GetFileInode(p)
		if err != nil {
			return "", fmt.Errorf("get inode of %s: %s", p, err)
		}
		if inode == uint64(meta.RootInode) {
			return p, nil
		}
	}
	return "", fmt.Errorf("%s is not inside JuiceFS", fpath)
}

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Mount the volume first: `juicefs format ... && juicefs mount META-URL /mnt/jfs`, then operate under /mnt/jfs
  2. Verify you are using the JuiceFS mountpoint path (`mount | grep juicefs`), not the underlying object storage bucket directory
  3. Check for shadowing mounts on subdirectories of the path and unmount/reorder them
  4. Use `juicefs sync` or `cp` if you intentionally want to operate on a non-JuiceFS filesystem

Example fix

// before
juicefs clone /home/user/data /home/user/data-copy  # not inside JuiceFS
// after
juicefs mount redis://127.0.0.1:6379/1 /mnt/jfs
juicefs clone /mnt/jfs/data /mnt/jfs/data-copy
Defensive patterns

Strategy: validation

Validate before calling

mnts := exec.Command("mount").Run() // verify target path prefix matches a juicefs mountpoint
if !strings.HasPrefix(target, juicefsMountpoint) {
    return errors.New("path must be inside a mounted JuiceFS volume")
}

Try / catch

if err := runClone(src, dst); strings.Contains(err.Error(), "is not inside JuiceFS") {
    mountJuicefs(mountpoint) // then retry under the mountpoint
}

Prevention

When it happens

Trigger: Running `juicefs clone` or `juicefs bench` against a path on a regular local filesystem (ext4/xfs/tmpfs), an NFS/CIFS mount, or the object-storage-backed directory directly — anywhere the walked-up inode never equals JuiceFS root inode 1.

Common situations: User forgets to mount the volume and passes the local cache/staging dir; passing the local object storage bucket path instead of the JuiceFS mountpoint; a nested non-JuiceFS bind mount shadows the path so inode 1 is never seen; running on a stale mountpoint where the FUSE inode check fails.

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/5421da2f14a139f2. Report an issue: GitHub.