agentleFS
AI-Shell-TeamAI-Shell-Team/aish/skills/nfs-cifs-mount-diagnose/SKILL.md

nfs-cifs-mount-diagnose

Skill578 starsChanged 6 months agoApache-2.0View on GitHub

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.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Match error patterns early: treat them as candidates, then verify.

    line 49
  2. Distinctive:

    Stop when enough: stop once the likely root cause is clear.

    line 50
  3. Very specific:

    No secrets in chat: do not paste passwords or password= / credentials= options.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Collect first: protocol (NFS/CIFS), server, export/share path, full error text, mount command used.
  2. Read-only first: modules, network, current mounts, fstab—do not mount on your own.
  3. Match error patterns early: treat them as candidates, then verify.
  4. Stop when enough: stop once the likely root cause is clear.
  5. 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

ItemExample
ProtocolNFS v3/v4 or CIFS/SMB
Serverfiles.example.com or IP
Remote pathNFS :/export/data; CIFS //server/share
Full errorwhole mount.nfs: ... / mount error(13): ... line
Contextmanual / fstab at boot / inside container

2. Error patterns (prefer these)

NFS

Error / symptomCommon causeDirection
access denied by server while mounting (esp. with a subdirectory path)Export/ACL/IP, wrong path, or missing subdirDo not assume “subdir missing” from the message alone; check exports (showmount -e), then the path
mount.nfs: No such devicenfs/sunrpc not loaded, or bad sunrpc option spellingCheck lsmod, /etc/modprobe.d/*sunrpc*; use tcp_slot_table_entries not tcp_slot_entries
Operation not permitted on NFSv4 while v3 worksNFSv4 client id / hostname conflict, etc.Try v3 to confirm; check hostname / nfs4 unique id; check server exports
Connection timed out / No route to hostNetwork, firewall, NFS/RPC portsping / 2049 / 111 before tuning mount options
Protocol not supportedMissing nfs-common or version mismatchInstall client package; align vers=
Works manually, fails at bootremote-fs / fstab options / network not ready_netdev, x-systemd.automount, remote-fs.target
mount: can't find ... in /etc/fstabWrong mount command shapeMissing source or target in the command

CIFS / SMB

Error / symptomCommon causeDirection
mount error(13): Permission deniedCredentials / share ACLCheck user, domain, credentials file mode 0600
mount error(112): Host is down / cannot connectHost, firewall, SMB port 445nc -zv <server> 445
mount error(2): No such file or directoryWrong share/pathVerify //server/share
mount error(95): Operation not supportedDialect/version mismatchTry vers=3.0 / 2.1 / 1.0 (legacy)
Missing mount.cifscifs-utils not installedDebian/Ubuntu: cifs-utils

3. Client environment (read-only)

findmnt -t nfs,nfs4,cifs 2>/dev/null
grep -E 'nfs|cifs|smb' /etc/fstab 2>/dev/null
command -v mount.nfs; dpkg -l nfs-common 2>/dev/null | tail -1
lsmod | grep -E 'nfs|sunrpc'
ls /etc/modprobe.d/*nfs* /etc/modprobe.d/*sunrpc* 2>/dev/null
command -v mount.cifs; dpkg -l cifs-utils 2>/dev/null | tail -1
lsmod | grep cifs

4. Connectivity (when server is known)

getent ahosts <server> | head -5
ping -c 3 -W 2 <server>
nc -zv -w 3 <server> 2049
nc -zv -w 3 <server> 111
rpcinfo -p <server> 2>/dev/null | head -20
showmount -e <server> 2>/dev/null | head -20
nc -zv -w 3 <server> 445

Port/RPC issues → fix network/firewall before mount options.
Resolve fails → consider dns-diagnose.

5. Example command shapes (suggestions only)

sudo mount -t nfs -o vers=4,proto=tcp <server>:/export /mnt/point
sudo mount -t nfs -o vers=3,proto=tcp <server>:/export /mnt/point
sudo mount -t cifs //server/share /mnt/point -o username=<user>,uid=$(id -u),gid=$(id -g),vers=3.0

Debian/Ubuntu client packages: nfs-common, cifs-utils.

Output format

## Conclusion
1–2 sentences: protocol + most likely cause.

## Evidence
- User error text and matched pattern
- Client packages/modules, fstab, port checks

## Recommendations
- Prioritized fix steps (user confirms before running)
- Never echo passwords into the chat or logs; remind about credential file permissions

Reply in the user's language.

Related skills

CaseSkill
DNS failure before mountdns-diagnose
Loss/latency to file servernetwork-path-diagnose
System lag after a successful mountdiagnose_system_lag

Example

User: mount.nfs: access denied by server while mounting 10.0.0.5:/data/backup

  1. Candidates → export ACL / wrong path / possibly missing subdir
  2. showmount -e / RPC checks; try export root only if appropriate
  3. Root denied → server/client ACL; root works but /backup fails → fix subdir

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.