Solved

NFS mount timeout

Posted on 2016-09-30
9
48 Views
Last Modified: 2016-10-07
I'm having trouble mounting a remote nfs mountpoint. The mountpoint is exported:

>showmount -e localhost
Export list for localhost:
/tmp/trash 24.96.yyy.xxx

and on the client host at 24.96.yyy.xxx I can telnet to ports 111 and 2049, so the firewall is open. The client fstab has:

lincoln:/tmp/trash /tmp/trash  nfs rw      0   0

When I try to mount:
1 14:52:21 root@server:~
> mount /tmp/trash
mount.nfs: Connection timed out
1 14:54:33 root@server:~

Open in new window

As you can see, this timeout takes about 70 seconds.

Any idea?
0
Comment
Question by:jmarkfoley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 41824442
NFS over Internet


Check /etc/exports
To see your export rules and make sure your ip matches the rule.
Why not setup a VPN ? Or using ssh tunnels over which you can mount the NFS share.

What is your ping/latency to the destination? Within fstab or if it is mounted on demand, you can adjust (increase timeout value)

Y
0
 
LVL 1

Assisted Solution

by:jmarkfoley
jmarkfoley earned 0 total points
ID: 41824469
arnold:

NFS over Internet

Check /etc/exports To see your export rules and make sure your ip matches the rule.
/etc/exports:
/tmp/trash      24.96.x.x(rw,no_root_squash)

Open in new window

That is the IP I'm trying to connect from. As mentioned, I can telnet to port 111 and 2049 on the host.
Why not setup a VPN ? Or using ssh tunnels over which you can mount the NFS share.
Not ready to go that route yet.
What is your ping/latency to the destination? Within fstab or if it is mounted on demand, you can adjust (increase timeout value)
Pinging is not enabled on the destination. I can rsync w/o problem.

If I can telnet to these ports, why wouldn't nfs work?

I find nothing in the destination logs. Permissions somehow?
0
 
LVL 78

Expert Comment

by:arnold
ID: 41824476
Different behavior. Telnet, you are the slowest in the link. If you hit a key, and wait. NFS when timeout for response is reached either starts retransmitting, or if hard set, interprets the timeout as a loss of .....

Try the following
Presumably you do not have your local system setup as an NFS server.
ssh -L 111:localhost:111 -L 2049:localhost:2049 user@remote
You would need to make sure the ssh connection does not timeout.....

Your exports file needs to include NFS access from localhost since that is what the source of the connection will be

mount -t NFS localhost:/temp/trash  /mnt

See If that functions better....

Rsync is a transfer that will retry. ...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:jmarkfoley
ID: 41824477
showmount -e targethost doesn't work either. Also times out.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 41824480
arnold:
Try the following
Presumably you do not have your local system setup as an NFS server.
ssh -L 111:localhost:111 -L 2049:localhost:2049 user@remote
You would need to make sure the ssh connection does not timeout.....
Just to be clear, the local host name is "server" that is the one trying to mount the nfs directory. The remote host is "lincoln", that is the one hosting the nfs mountpoint. So, from "server", as root I tried:
> ssh -L 111:localhost:111 -L 2049:localhost:2049 mfoley@lincoln
mfoley@lincoln's password:
bind: Address already in use
bind: Address already in use
Last login: Sat Oct  1 01:14:55 2016 from 24.96.xxx.yyy
Linux 3.10.17-smp.

Open in new window

It did ask me for a password. It also logged me into the mfoley account on lincoln. Does this tell you anything?

Your exports file needs to include NFS access from localhost since that is what the source of the connection will be
Not sure what you mean. Can you give example?

mount -t NFS localhost:/temp/trash  /mnt
I asume you want me to do this from the hosting server, "lincoln". Interesting result:
1 01:41:35 root@lincoln:~
>mount -t nfs localhost:/temp/trash  /mnt
mount.nfs: access denied by server while mounting localhost:/temp/trash

Open in new window

Perhaps because the export specifies the IP? I'll remove that and try again ...

... Nope, even with /etc/exports having "/tmp/trash      *(rw,no_root_squash)" I still get the access denied. Perhaps this is a clue!?

RATS! My bad. I copy/pasted your mount string and just noticed that you wrote "temp" instead of "tmp". When I corrected the spelling, it mounted just fine. :(
0
 
LVL 78

Expert Comment

by:arnold
ID: 41824487
Rather errors you see is because 111 and 2049 on your local system are in use already
lsof -i:111
lsof -I:2049

The mount needs to run on the system from where you usually access it.

SystemA is the remote with Lincoln the one running as the NFS servers.
So you ssh from SystemA to Lincoln with the local tunnels.
On the SystemA, you would try to mount the NFS share via the ssh tunnel.

Presumably, your rsync rubs over an ssh connection/tunnel.
Do you have an option to setup a VPN connection, IPSec, PPTP, openvpn?
With a VPN, you would be defining access based on the private IPs.

mount -t NFS Lincoln:/tmp/trash /mnt
Where Lincoln is the private ip of the system based on the VPN definition.
Your exports file would reference the LAN Ip of the SystemA......
0
 
LVL 1

Accepted Solution

by:
jmarkfoley earned 0 total points
ID: 41825465
I figured it out. I also needed to open the port range 32768-65535 to the NFS server because the RPC prog can map to this port range. Once I did that, it worked.
0
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 41833345
I found the answer. Points to Arnold for playing!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 101
Intel fortran compiler (ifort) 5 86
Apache module 5 87
postfix start error! 9 86
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question