fix mount.nfs: mount system call failed

fix mount.nfs: mount system call failed

Spread the love

NFS allows you to share local disk over your local network. NFS originally supported by Linux, however, in recent releases of Windows supports it. Sometimes, you might face the error message mount.nfs: mount system call failed or check lease failed on NFSv4 server when you mount shared directory from NFS server. hence, failing to mount your directory.

Investigating the issue

During investigating any issue you cloud obtain knowledge about many things more than getting a direct solution from someone. hence, I suggest continuing reading.

Check connectivity to the server.

The first thing is to confirm that you don’t have any connectivity issues to the server. because sometimes network guys do unintentionally.

you can check nfs status by executing rpcinfo command.

The above results reported by the server saying I’m OK, however, it’s a misleading report. therefore, further investigation is required.

Check client OS logs.

Further scrutiny is required, hence, we will dive into OS logs and check kernel ring buffer messages.

Our objective to search for our famous error message “mount.nfs: mount system call failed” or error related to NFS. So, execute dmesg command as shown below.

Similar results might show that the NFS server is not responding. So that leads to focus our efforts on the server

dmesg is used to examine or control the kernel ring buffer.

Solving the problem

All NFS servers maintain a table of local directories that are accessible to NFS clients. Yet, restarting NFS services solve nothing. therefore, We need to force NFS to re-check its shares table and update it with the current configurations. luckily NFS tools come with one called exportfs.

This tool maintains table of exported NFS file systems as described in man pages.

login into NFS server with superuser privileges. then, execute exportfs command with parameter -a to rebuild all exports tables.