Problems With NFS

General support questions
Post Reply
heliophyte
Posts: 10
Joined: 2017/12/02 15:37:53
Contact:

Problems With NFS

Post by heliophyte » 2017/12/02 16:48:24

The last time I had to do anything with NFS was 3+ years ago while working with CentOS 6. Here's the summary of my problem.
I am working with 4 identical machines. For this documentation, GREY is the NFS server and is the only one of the 4 running iptables at the moment. BLUE is the NFS client. I've been able to reproduce this multiple times using different machines as the server and client each time.

I know that it's possible I've fat fingered something or forgotten something along the way. Any assistance here is appreciated.
Thanks,
~J
[root@blue ~]# mount -vt nfs 192.168.1.106:/shares/group1 /home/test_dir
mount.nfs: timeout set for Sat Dec 2 11:29:31 2017
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.1.106,clientaddr=192.168.1.107'
mount.nfs: mount(2): Connection timed out
mount.nfs: Connection timed out
__________________________________________

[root@grey /]# ls -lh /shares/
total 0
drwxr-xr-x 2 root root 6 Dec 2 10:57 group1
[root@grey /]# ls -lh / | grep shares
drwxr-xr-x 3 root root 20 Dec 2 10:57 shares
[root@grey /]# cat /etc/exports
/shares/group1 192.168.1.0/24(rw,no_root_squash)
[root@grey /]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
[root@grey /]# yum list installed | grep nfs
libnfsidmap.x86_64 0.25-17.el7 @base
nfs-utils.x86_64 1:1.3.0-0.48.el7_4 @updates
[root@grey /]# 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 20048 mountd
100005 1 tcp 20048 mountd
100005 2 udp 20048 mountd
100005 2 tcp 20048 mountd
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 3 udp 2049 nfs_acl
100021 1 udp 35805 nlockmgr
100021 3 udp 35805 nlockmgr
100021 4 udp 35805 nlockmgr
100021 1 tcp 41306 nlockmgr
100021 3 tcp 41306 nlockmgr
100021 4 tcp 41306 nlockmgr
100024 1 udp 56374 status
100024 1 tcp 53360 status
[root@grey /]# systemctl status firewalld
● firewalld.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
[root@grey /]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Sat 2017-12-02 11:27:08 EST; 6s ago
Process: 5123 ExecStop=/usr/libexec/iptables/iptables.init stop (code=exited, status=0/SUCCESS)
Process: 791 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 791 (code=exited, status=0/SUCCESS)

Nov 29 18:49:17 grey.yltd systemd[1]: Starting IPv4 firewall with iptables...
Nov 29 18:49:18 grey.yltd iptables.init[791]: iptables: Applying firewall rules: [ OK ]
Nov 29 18:49:18 grey.yltd systemd[1]: Started IPv4 firewall with iptables.
Dec 02 11:27:07 grey.yltd systemd[1]: Stopping IPv4 firewall with iptables...
Dec 02 11:27:07 grey.yltd iptables.init[5123]: iptables: Setting chains to policy ACCEPT: filter nat mangle [ OK ]
Dec 02 11:27:07 grey.yltd iptables.init[5123]: iptables: Flushing firewall rules: [ OK ]
Dec 02 11:27:08 grey.yltd iptables.init[5123]: iptables: Unloading modules: [ OK ]
Dec 02 11:27:08 grey.yltd systemd[1]: Stopped IPv4 firewall with iptables.
[root@grey /]# sestatus
SELinux status: disabled
_______________________________________

[root@blue ~]# ls -lh /home/ | grep test
drwxr-xr-x 2 root root 6 Dec 2 10:56 test_dir
[root@blue ~]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
[root@blue ~]# yum list installed | grep nfs
libnfsidmap.x86_64 0.25-17.el7 @base
nfs-utils.x86_64 1:1.3.0-0.48.el7_4 @updates
[root@blue ~]# 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
100024 1 udp 42922 status
100005 1 udp 20048 mountd
100005 1 tcp 20048 mountd
100024 1 tcp 49442 status
100005 2 udp 20048 mountd
100005 2 tcp 20048 mountd
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 3 udp 2049 nfs_acl
100021 1 udp 36482 nlockmgr
100021 3 udp 36482 nlockmgr
100021 4 udp 36482 nlockmgr
100021 1 tcp 44194 nlockmgr
100021 3 tcp 44194 nlockmgr
100021 4 tcp 44194 nlockmgr
[root@blue ~]# systemctl status firewalld
● firewalld.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
[root@blue ~]# systemctl status iptables
Unit iptables.service could not be found.
[root@blue ~]# sestatus
SELinux status: disabled
Jim Yadon
http://jim.yadon.ltd

"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which." ~ D. Adams

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Problems With NFS

Post by hunter86_bg » 2017/12/02 19:03:57

Run the following from a client:

Code: Select all

showmount -e grey

Code: Select all

mount.nfs -o nfsvers=4 grey:/ /mnt && findmnt /mnt
Run the following from grey:

Code: Select all

cat /proc/fs/nfsd/versions

heliophyte
Posts: 10
Joined: 2017/12/02 15:37:53
Contact:

Re: Problems With NFS

Post by heliophyte » 2017/12/02 19:27:11

Using the name, first two hang. No output, no response, no new entries in /var/log/messages.

Code: Select all

[root@blue ~]# cat /proc/fs/nfsd/versions
-2 +3 +4 +4.1 +4.2
[root@blue ~]# mount.nfs -o nfsvers=4 192.168.1.106:/ /mnt && findmnt /mnt
mount.nfs: Connection timed out
Jim Yadon
http://jim.yadon.ltd

"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which." ~ D. Adams

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Problems With NFS

Post by hunter86_bg » 2017/12/02 20:38:01

If 'showmount -e' fails - there is a problem... Are you sure that there is no Hardware Firewall in 192.168.1.0/24 ? Usually this behaviour indicates that there is a firewall issue or loss of packets (in some rare cases - the firewall can scramble the order of packets sent from the client to the server).

Let's test the server first. From grey try to mount locally his exports:

Code: Select all

showmount -e 192.168.1.106 ; mount.nfs -o nfsvers=4.0 192.168.1.106:/ /mnt && findmnt /mnt
Edit: Also check "/var/log/messages" and the "journalctl -e"

heliophyte
Posts: 10
Joined: 2017/12/02 15:37:53
Contact:

Re: Problems With NFS

Post by heliophyte » 2017/12/02 22:34:15

Are you sure that there is no Hardware Firewall in 192.168.1.0/24 ?
...actually, now that you mention it, everything is connected to a managed Cisco Small business switch. I'll reset it and let you know what I find.
Jim Yadon
http://jim.yadon.ltd

"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which." ~ D. Adams

heliophyte
Posts: 10
Joined: 2017/12/02 15:37:53
Contact:

Re: Problems With NFS

Post by heliophyte » 2017/12/03 02:18:59

It turns out it was the switch. It was running on a version of firmware that did not adequately support jumbo frames. All is well now. :)
Jim Yadon
http://jim.yadon.ltd

"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which." ~ D. Adams

Post Reply