Linux NFS Troubleshooting: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 26: Line 26:
=Failures=
=Failures=


=mount hangs=
==mount hangs==


I've seen cases when trying to mount a filesystem from ''other machine'' hangs if nfs is not started on ''that machine'' (service nfs start).
I've seen cases when trying to mount a filesystem from ''other machine'' hangs if nfs is not started on ''that machine'' (service nfs start).


=<tt>mount.nfs: access denied by server while mounting</tt>=
==<tt>mount.nfs: access denied by server while mounting</tt>==


I've also seen cases when I get the following error message when not using <tt>-t nfs</tt>, so use <tt>-t nfs</tt>:
I've also seen cases when I get the following error message when not using <tt>-t nfs</tt>, so use <tt>-t nfs</tt>:
Line 38: Line 38:
</pre>
</pre>


=<tt>mount(2): No such file or directory</tt>=
==<tt>mount(2): No such file or directory</tt>==


<tt>mount -v</tt> yields:
<tt>mount -v</tt> yields:
Line 49: Line 49:


I get this because I use the wrong exported path in <tt>/etc/fstab</tt>.
I get this because I use the wrong exported path in <tt>/etc/fstab</tt>.
==<tt>mount(2): No route to host</tt>==
<tt>mount -v</tt> yields:
<pre>
mount -v -t nfs 192.168.1.2:/volume3/dropbox /mnt/tmp
mount.nfs: timeout set for Sun Aug 21 00:44:48 2016
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.2,clientaddr=192.168.1.9'
mount.nfs: mount(2): No route to host
</pre>

Revision as of 07:44, 21 August 2016

Internal

List Filesystems Exported by a NFS Server

exportfs: list filesystems exported by a NFS server

Verbose mount

Try to mount with -v (verbose)

showmount

Use

showmount -e

on the server to see what is exported.

Failures

mount hangs

I've seen cases when trying to mount a filesystem from other machine hangs if nfs is not started on that machine (service nfs start).

mount.nfs: access denied by server while mounting

I've also seen cases when I get the following error message when not using -t nfs, so use -t nfs:

mount.nfs: access denied by server while mounting f01:/opt/shared

mount(2): No such file or directory

mount -v yields:

mount.nfs: trying text-based options 'bg,vers=4,addr=172.31.20.184,clientaddr=172.31.21.24'
mount.nfs: mount(2): No such file or directory
...

I get this because I use the wrong exported path in /etc/fstab.

mount(2): No route to host

mount -v yields:

mount -v -t nfs 192.168.1.2:/volume3/dropbox /mnt/tmp
mount.nfs: timeout set for Sun Aug 21 00:44:48 2016
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.2,clientaddr=192.168.1.9'
mount.nfs: mount(2): No route to host