| name | nfs-cifs-mount-diagnose |
| version | 1.0.0 |
| description | Diagnose NFS/CIFS(SMB) mount failures on this host. Match common error patterns and run read-only client/network checks; suggest fixes without auto-running mount or editing fstab. Also matches Chinese requests such as NFS 挂载、CIFS 挂载、挂载失败、access denied by server while mounting.
|
| author | aish |
| context | subagent |
| agent | troubleshoot |
| allowed-tools | ["bash","read_file","grep","glob"] |
| triggers | ["nfs-cifs-mount-diagnose","NFS mount","CIFS mount","SMB mount","mount.nfs","mount failed","access denied by server while mounting","mount error","NFS 挂载","CIFS 挂载","SMB 挂载","挂载失败"] |
| platforms | ["linux"] |
| distributions | ["deepin","debian","ubuntu","uos"] |
NFS / CIFS mount diagnosis
Troubleshoot NFS or CIFS/SMB mount failures, boot-time automount failures, and permission denials on this host.
Out of scope: automatically running mount/umount, editing fstab, or calling cloud NAS APIs. Suggest only; write actions need explicit user confirmation.
Rules
- Collect first: protocol (NFS/CIFS), server, export/share path, full error text, mount command used.
- Read-only first: modules, network, current mounts, fstab—do not mount on your own.
- Match error patterns early: treat them as candidates, then verify.
- Stop when enough: stop once the likely root cause is clear.
- No secrets in chat: do not paste passwords or
password= / credentials= options.
Workflow
Collect info → error pattern match → client environment → connectivity → recommendations
1. Collect info
| Item | Example |
|---|
| Protocol | NFS v3/v4 or CIFS/SMB |
| Server | files.example.com or IP |
| Remote path | NFS :/export/data; CIFS //server/share |
| Full error | whole mount.nfs: ... / mount error(13): ... line |
| Context | manual / fstab at boot / inside container |
2. Error patterns (prefer these)
NFS
| Error / symptom | Common cause | Direction |
|---|
access denied by server while mounting (esp. with a subdirectory path) | Export/ACL/IP, wrong path, or missing subdir | Do not assume “subdir missing” from the message alone; check exports (showmount -e), then the path |
mount.nfs: No such device | nfs/sunrpc not loaded, or bad sunrpc option spelling |