Unable to mount a NFS

Ralf

New Member
Mar 30, 2014
18
0
1
Germany
Summary: On Server1 I want to configure a nfs server. Server2 is the nfs client. For comparison I configured a nfs server on Server3. Server2 can mount the nfs file system of Server3, but does not mount the nfs file system on Server1, which is the problem I have.

Server1 has IP 1.1.1.1, Server2 has IP 2.2.2.2, Server3 has IP 3.3.3.3

I observed the problem while configuring Proxmox, but it turned out to be independent of Proxmox. Nethertheless, I hope to find help here.

The installation procedure is as following. I started with a fresh installation of "Proxmox VE 3.1 (+RAID1 +LVM)" on Server1.
root@server1:~# pveversion
pve-manager/3.1-3/dc0e9b0e (running kernel: 2.6.32-23-pve)

root@server1:~# apt-get update && apt-get dist-upgrade
Configuration of the nfs server

root@server1:~# apt-get install nfs-kernel-Server

root@server1:~# mkdir /home/nfs

In /etc/exports I have added the line:
/home/nfs 2.2.2.2(rw,no_root_squash,async) 1.1.1.1(rw,no_root_squash,async) nc)

root@server1:~# /etc/init.d/nfs-kernel-server restart

Now I can mount the nfs locally
root@server1:~# mkdir /mountnfs
root@server1:~# mount 1.1.1.1:/home/nfs /mountnfs
root@server1:~# df -h
Filesystem Size Used Avail Use% Mounted on
...
1.1.1.1:/home/nfs 9.9G 1.3G 8.2G 14% /mountnfs


But on Server2 I am unable to mount the nfs of Server1
root@server2:~# mkdir /mountnfs
root@server2:~# mount 1.1.1.1:/home/nfs /mountnfs
mount.nfs: Connection timed out


Diagnostics on Server1
root@server1:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source Destination

root@server1:~# showmount -e
Export list for server1:
/home/nfs 1.1.1.1,2.2.2.2

root@server1:/# showmount -d
Directories on server1:
/home/nfs

root@server1:/# showmount -a
All mount points on server1:
1.1.1.1:/home/nfs

There are only commented lines in /etc/hosts.allow and in /etc/hosts.deny of Server1.


Diagnostics on Server2
root@server2:~# mount -vvv -t nfs 1.1.1.1:/home/nfs /mountnfs
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "1.1.1.1:/home/nfs"
mount: node: "/mountnfs"
mount: types: "nfs"
mount: opts: "(null)"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "1.1.1.1:/home/nfs"
mount: external mount: argv[2] = "/mountnfs"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
mount.nfs: timeout set for Sun Aug 17 21:58:57 2014
mount.nfs: trying text-based options 'vers=4,addr=1.1.1.1,clientaddr=2.2.2.2'
mount.nfs: mount(2): Connection timed out
mount.nfs: Connection timed out

root@server2:~# showmount -e
clnt_create: RPC: Program not registered

root@server2:~# rpcinfo -p 1.1.1.1
rpcinfo: can't contact portmapper: RPC: Remote system error - Connection timed out

root@server2:~# rpcinfo -p 3.3.3.3
program vers proto port service
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 57097 status
100024 1 tcp 40752 status
100021 1 udp 42342 nlockmgr
100021 3 udp 42342 nlockmgr
100021 4 udp 42342 nlockmgr
100021 1 tcp 36508 nlockmgr
100021 3 tcp 36508 nlockmgr
100021 4 tcp 36508 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100005 1 udp 38372 mountd
100005 1 tcp 48829 mountd
100005 2 udp 38372 mountd
100005 2 tcp 48829 mountd
100005 3 udp 38372 mountd
100005 3 tcp 48829 mountd

root@server2:~# tcpdump -n -s0 host 1.1.1.1
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

root@server2:~# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_req=1 ttl=52 time=19.6 ms
...


The output of "root@server2:~# rpcinfo -p 1.1.1.1" is not as it should be, but I don't know how to interprete / use that information.

Any help would be highly appreciated.
 
Hi, thank you for your reply.

# exportfs
/home/nfs 2.2.2.2
/home/nfs 1.1.1.1

Since 2.2.2.2 was not able to mount the nfs, I tried to mount it on 1.1.1.1 locally. And yes, the line is
/home/nfs 2.2.2.2(rw,no_root_squash,async) 1.1.1.1(rw,no_root_squash,async)

Sorry about the typo.
Kind regards, Ralf.
 
Hi,

the problem has been solved. I contacted the hoster and they found that "they did apply a too restrictive policy at some switch".

Kind regards,
Ralf.