2011-10-30

FreeBSD - Mounting NFS share gives error "timed out"

Connecting to a NFS server from a FreeBSD installation hit an error. The command executed was :
mount -t nfs nfs.example.com:/vol/some/nfs/share /mnt/mount/point

The error :
[tcp] nfs.example.com:/vol/some/nfs/share: RPCMNT: clnt_create: RPC: Remote system error - Operation timed out


The firewall has open port 111 (portmapper) & 2049 (mountd), so that should clear some of the permission. But still no luck.

Checking network connections doesn't seems to show anything interesting, particularly in ESTABLISHED & LISTEN state connections.
E.g.
netstat -an

But checking the NFS server info from the NFS client do reveal some interesting info :
# rpcinfo nfs.example.com
   program version netid     address                service    owner
    100024    1    tcp       0.0.0.0.15.207         status     unknown
    100024    1    udp       0.0.0.0.15.207         status     unknown
    100011    1    udp       0.0.0.0.15.209         rquotad    unknown
    100021    4    tcp       0.0.0.0.15.205         nlockmgr   unknown
    100021    3    tcp       0.0.0.0.15.205         nlockmgr   unknown
    100021    1    tcp       0.0.0.0.15.205         nlockmgr   unknown
    100021    4    udp       0.0.0.0.15.205         nlockmgr   unknown
    100021    3    udp       0.0.0.0.15.205         nlockmgr   unknown
    100021    1    udp       0.0.0.0.15.205         nlockmgr   unknown
    100005    3    tcp       0.0.0.0.15.206         mountd     unknown
    100005    2    tcp       0.0.0.0.15.206         mountd     unknown
    100005    1    tcp       0.0.0.0.15.206         mountd     unknown
    100005    3    udp       0.0.0.0.15.206         mountd     unknown
    100005    2    udp       0.0.0.0.15.206         mountd     unknown
    100005    1    udp       0.0.0.0.15.206         mountd     unknown
    100003    3    tcp       0.0.0.0.8.1            nfs        unknown
    100003    2    tcp       0.0.0.0.8.1            nfs        unknown
    100003    3    udp       0.0.0.0.8.1            nfs        unknown
    100003    2    udp       0.0.0.0.8.1            nfs        unknown
    100000    2    tcp       0.0.0.0.0.111          rpcbind    unknown
    100000    2    udp       0.0.0.0.0.111          rpcbind    unknown

Seems like these services "mountd", "nlockmgr", "rquotad" & "status" are needed. Those services translate to port no. 4045, 4046, 4047 & 4049.

After opening these ports in firewall, the NFS share mount finally works.

Voilla !!!

No comments: