I'm trying to share some directories with NFS among Debian machines. In order to do so, I installed nfs-common and nfs-kernel-server on the server machine. It seemed that starting portmap daemon lasted a long time and I get the following messages in /var/log/messages
:
Jan 30 18:18:03 zape kernel: portmap: server localhost not responding, timed out
Jan 30 18:18:03 zape kernel: RPC: failed to contact portmap (errno -5).
After that, I edited the /etc/exports
file to include the directories to be shared; in particular, I added the following code:
/home 192.168.9.0/24(rw,sync,no_wdelay,subtree_check,root_squash)
/opt 192.168.9.0/24(rw,sync,no_wdelay,subtree_check,root_squash)
/usr/local 192.168.9.0/24(rw,sync,no_wdelay,subtree_check,root_squash)
The next step was to export the directories with exportfs -var
. The answer I got is:
exporting 192.168.9.0/24:/usr/local
exporting 192.168.9.0/24:/home
exporting 192.168.9.0/24:/opt
Up to now, nothing really strange. However, when I did showmount -e
to see which were the exported directories, I got a timeout whitout any error flag. I also got a timeout when I ran rpcinfo -p
.
Everything is properly installed and running in the client (192.168.9.102), but when I try to mount the shared directories, I get the following error:
mount to NFS server '192.168.9.101' failed.
RPC Error: 15 ( Program not registered )
mount to NFS server '192.168.9.101' failed.
RPC Error: 15 ( Program not registered )
mount to NFS server '192.168.9.101' failed.
RPC Error: 15 ( Program not registered )
It seems to me that the problem is in the server.
Any help will be very appreciated!!! Thanks in advance.
P.S.: If I do netstat -tupan
I get the following connections running:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 20229/portmap
tcp6 0 0 :::22 :::* LISTEN 2669/sshd
tcp6 0 144 ::ffff:192.168.9.101:22 ::ffff:192.168.1.:36023 ESTABLISHED25159/2
udp 0 0 0.0.0.0:111 0.0.0.0:* 20229/portmap
P.S.2: These are the processes runing on the server after the whole described process (obtained with ps -faux)
USER PID CPU MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 1944 640 ? Ss Jan29 0:01 init [2]
root 2 0.0 0.0 0 0 ? S Jan29 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN Jan29 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< Jan29 0:00 [events/0]
root 5 0.0 0.0 0 0 ? S< Jan29 0:00 [khelper]
root 6 0.0 0.0 0 0 ? S< Jan29 0:00 [kthread]
root 9 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kblockd/0]
root 26 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kseriod]
root 77 0.0 0.0 0 0 ? S Jan29 0:00 \_ [pdflush]
root 78 0.0 0.0 0 0 ? S Jan29 0:00 \_ [pdflush]
root 79 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kswapd0]
root 80 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [aio/0]
root 526 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [khubd]
root 885 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kjournald]
root 1333 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kpsmoused]
root 1629 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kmirrord]
root 1664 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kjournald]
root 1666 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kjournald]
root 1668 0.0 0.0 0 0 ? S< Jan29 0:00 \_ [kjournald]
root 1045 0.0 0.2 2180 616 ? S<s Jan29 0:00 udevd --daemon
root 1114 0.0 0.3 2712 812 ? S< Jan29 1:06 /bin/sh -e /lib/udev/net.agent
root 26207 0.0 0.1 1560 396 ? S< 18:22 0:00 \_ sleep 1
root 1117 0.0 0.3 2708 808 ? S< Jan29 0:43 /bin/sh -e /lib/udev/net.agent
root 26201 0.0 0.1 1560 396 ? S< 18:22 0:00 \_ sleep 1
root 1968 0.0 0.2 1628 640 ? Ss Jan29 0:00 /sbin/syslogd
root 1974 0.0 0.1 1580 384 ? Ss Jan29 0:00 /sbin/klogd -x
root 2662 0.2 0.3 2712 828 ? S< Jan29 2:59 /bin/sh -e /lib/udev/net.agent
root 26204 0.0 0.1 1564 396 ? S< 18:22 0:00 \_ sleep 1
root 2669 0.0 0.4 4932 1092 ? Ss Jan29 0:00 /usr/sbin/sshd
root 25159 0.0 0.9 7704 2360 ? Ss 12:20 0:00 \_ sshd: root@pts/2
root 25188 0.0 0.6 3980 1708 pts/2 Ss 12:20 0:00 \_ -bash
root 26208 0.0 0.3 3400 928 pts/2 R+ 18:22 0:00 \_ ps -faux
root 3241 0.0 0.2 2192 748 ? Ss Jan29 0:00 /usr/sbin/cron
root 3298 0.0 0.1 1572 492 tty1 Ss+ Jan29 0:00 /sbin/getty 38400 tty1
root 3299 0.0 0.1 1576 492 tty2 Ss+ Jan29 0:00 /sbin/getty 38400 tty2
root 3300 0.0 0.1 1572 492 tty3 Ss+ Jan29 0:00 /sbin/getty 38400 tty3
root 3301 0.0 0.1 1572 492 tty4 Ss+ Jan29 0:00 /sbin/getty 38400 tty4
root 3304 0.0 0.1 1572 492 tty5 Ss+ Jan29 0:00 /sbin/getty 38400 tty5
root 3305 0.0 0.1 1572 492 tty6 Ss+ Jan29 0:00 /sbin/getty 38400 tty6
daemon 20229 0.0 0.1 1688 472 ? Ss 18:12 0:00 /sbin/portmap
root 22603 0.0 0.2 3512 572 ? Ss 18:16 0:00 /usr/sbin/rpc.idmapd