{"record":{"id":"a74c630e300b85b4","repo":"juicedata/juicefs","slug":"no-mount-command-found-for-s","errorCode":null,"errorMessage":"no mount command found for %s","messagePattern":"no mount command found for (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/debug_unix.go","lineNumber":93,"sourceCode":"\t\t\t\tif find {\r\n\t\t\t\t\tnewCmd := strings.Join(fields[7:], \" \")\r\n\t\t\t\t\tnewUid, newPid, newPpid := strings.TrimSpace(fields[0]), strings.TrimSpace(fields[1]), strings.TrimSpace(fields[2])\r\n\t\t\t\t\tif newPid == ppid {\r\n\t\t\t\t\t\treturn uid, pid, cmd, nil\r\n\t\t\t\t\t} else if pid == newPpid {\r\n\t\t\t\t\t\treturn newUid, newPid, newCmd, nil\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn \"\", \"\", \"\", fmt.Errorf(\"find more than one mount process for %s\", mp)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcmd = strings.Join(fields[7:], \" \")\r\n\t\t\t\tuid, pid, ppid = strings.TrimSpace(fields[0]), strings.TrimSpace(fields[1]), strings.TrimSpace(fields[2])\r\n\t\t\t\tfind = true\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif cmd == \"\" {\r\n\t\treturn \"\", \"\", \"\", fmt.Errorf(\"no mount command found for %s\", mp)\r\n\t}\r\n\treturn uid, pid, cmd, nil\r\n}\r\n","sourceCodeStart":75,"sourceCodeEnd":97,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/debug_unix.go#L75-L97","documentation":"`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'.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (mounted in container, debug on host)\n$ juicefs debug /jfs\nno mount command found for /jfs\n// after\n$ docker exec <ctr> juicefs debug /jfs","handlingStrategy":"validation","validationCode":"if fi, err := os.Stat(mp); err != nil || !isMounted(mp) { // e.g. check /proc/mounts\n  return fmt.Errorf(\"%s is not mounted\", mp)\n}","typeGuard":"null","tryCatchPattern":"err := runDebug(mp)\nif err != nil && strings.Contains(err.Error(), \"no mount command found\") {\n  // mount not visible in this namespace/user context; adjust context and retry\n}","preventionTips":["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"],"tags":["cli","process","mount"],"backgroundTag":"resource-not-found","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}