Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to connect to my Amazon EC2 from my laptop using NFS. I've installed nfs-utils rpcbind and have the following in /etc/exports

/mnt/data/myuser *(rw,async)

Then load the changes

exportfs -ar

And start the services

service rpcbind start
service nfs start
service nfslock start

And finally open the following ports in Amazons "Security Group" for the instance.

  • TCP: 111, 2049
  • UDP: 111, 32806

Then on my laptop (MacBook Pro), i try the following

mkdir test
mount -t nfs myserver.com:/mnt/data/myuser ./test

But I get the following response each time:

mount_nfs: can't mount /mnt/data/myuser from nmdev.no onto ./test: Operation timed out

Any ideas why this might be happening?

share|improve this question
    
Did you ever fix your problem? I'm experiencing the same issues with mounting an NFS share –  Ben Fransen Apr 12 '14 at 11:12
    
Unfortunately I did not –  frigg May 30 '14 at 12:49

1 Answer 1

up vote 1 down vote accepted

I had the same problem, and in my case I had not opened the required ports in my ec2 security group(s).

Double check that you have opened all the ports used by nfs, mountd, rpcbind, and/or portmapper. You can see the list of ports by running rpcinfo -p on the NFS server, for example:

[ec2-user@ip-xxx ~]$ rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  34972  mountd
    100005    1   tcp  38192  mountd
    100005    2   udp  35637  mountd
    100005    2   tcp  57896  mountd
    100005    3   udp  54764  mountd
    100005    3   tcp  38193  mountd
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100021    1   udp  48615  nlockmgr
    100021    3   udp  48615  nlockmgr
    100021    4   udp  48615  nlockmgr
    100021    1   tcp  49687  nlockmgr
    100021    3   tcp  49687  nlockmgr
    100021    4   tcp  49687  nlockmgr

In my case I had already opened 111 and 2049, but none of the ports used by mountd. I was getting a long wait and eventually "Resource not available" when running my mount command, after opening the required ports it works immediately.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.