juicedata/juicefs · error

get inode of %s: %s

Error message

get inode of %s: %s

What it means

findMountpoint walks up from a path toward '/', calling utils.GetFileInode on each ancestor until it finds the JuiceFS root inode. If any intermediate stat fails (unreachable mount, permission denied, dangling symlink), the walk aborts with "get inode of %s: %s" naming the exact ancestor path that could not be inspected.

Source

Thrown at cmd/clone.go:164

	}

	progress := utils.NewProgress(false)
	defer progress.Done()
	bar := progress.AddCountBar("Cloning entries", 0)
	if _, errno := readProgress(f, func(count uint64, total uint64) {
		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. Run `namei -l <path>` to find the first untraversable component and fix its permissions or existence
  2. `cd` into the mountpoint and use relative or shorter paths that avoid problem ancestors
  3. Ensure the mountpoint is active: ls the mount directory directly, remount if dead
  4. Run the command as a user with traverse permission on every component (or via sudo)

Example fix

# before
juicefs bench /home/otheruser/jfs-mount  # get inode of /home/otheruser: permission denied
// after
sudo -u otheruser juicefs bench /home/otheruser/jfs-mount
Defensive patterns

Strategy: validation

Validate before calling

for p := absPath; p != "/"; p = filepath.Dir(p) {
    if _, err := os.Stat(p); err != nil {
        return fmt.Errorf("cannot traverse %s: %w", p, err)
    }
}

Try / catch

if err := runBenchOrClone(p); strings.Contains(err.Error(), "get inode of ") {
    // namei -l p to locate the bad ancestor, fix perms, retry
}

Prevention

When it happens

Trigger: Running `juicefs clone` or `juicefs bench` with SRC/DST under a path where some ancestor cannot be stat'ed — e.g. a parent directory without +x permission for the user, a dead autofs map entry, or an unresponsive FUSE mount in the path chain.

Common situations: Passing a path through a directory the user cannot traverse (common with other users' home dirs); autofs-mounted path not yet triggered; VPN/network storage path in the prefix temporarily down; typo creating a nonexistent prefix (ENOENT).

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


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