juicedata/juicefs · error
no mount command found for %s
Error message
no mount command found for %s
What it means
`getCmdMount` scans `ps` output for a mount command whose fields include the mount point. If the scan completes, no disambiguation error occurred, but no command line was captured (`cmd == ""`), the function returns this error, which `juicefs debug` surfaces as 'failed to get mount command'.
Source
Thrown at cmd/debug_unix.go:93
if find {
newCmd := strings.Join(fields[7:], " ")
newUid, newPid, newPpid := strings.TrimSpace(fields[0]), strings.TrimSpace(fields[1]), strings.TrimSpace(fields[2])
if newPid == ppid {
return uid, pid, cmd, nil
} else if pid == newPpid {
return newUid, newPid, newCmd, nil
} else {
return "", "", "", fmt.Errorf("find more than one mount process for %s", mp)
}
}
cmd = strings.Join(fields[7:], " ")
uid, pid, ppid = strings.TrimSpace(fields[0]), strings.TrimSpace(fields[1]), strings.TrimSpace(fields[2])
find = true
}
}
}
if cmd == "" {
return "", "", "", fmt.Errorf("no mount command found for %s", mp)
}
return uid, pid, cmd, nil
}
View on GitHub (pinned to c9a67b23e8)
Solutions
- Confirm the mount exists: `mount | grep <mp>` / `df <mp>`; if stale, unmount and remount.
- Run `juicefs debug` in the same namespace/container as the mount process (e.g. `docker exec` into the container).
- Re-run with sudo to see all users' processes.
- If the mount is healthy, this only blocks the 'Mount Command' section — other debug output may still be usable; check earlier warnings.
Example fix
// before (mounted in container, debug on host) $ juicefs debug /jfs no mount command found for /jfs // after $ docker exec <ctr> juicefs debug /jfs
Defensive patterns
Strategy: validation
Validate before calling
if fi, err := os.Stat(mp); err != nil || !isMounted(mp) { // e.g. check /proc/mounts
return fmt.Errorf("%s is not mounted", mp)
} Type guard
null
Try / catch
err := runDebug(mp)
if err != nil && strings.Contains(err.Error(), "no mount command found") {
// mount not visible in this namespace/user context; adjust context and retry
} Prevention
- Confirm the path is mounted via `mount`/`df` before debugging
- Run debug inside the same container/namespace as the mount
- Use sudo if the mount belongs to another user
When it happens
Trigger: Running `juicefs debug <mp>` on Unix when no process line matches the mount point — the volume is not actually mounted, the mount was performed in a different PID/UTS namespace (container), or the process list is truncated/hidden from the current user.
Common situations: Debugging a path that isn't mounted (stale FUSE mountpoint); the mount runs inside a container while debug runs on the host or vice versa; running as unprivileged user unable to see another user's process command line.
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
- failed to get mount command: %v
- find more than one mount process for %s
- failed to execute command `%s`: %v
- failed to execute command `%s`: %v
- failed to stat %s: %s
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/a74c630e300b85b4.
Report an issue: GitHub.