I have the problem with NFS file system. Client could not connect to the server but the latter gets the request and grants access for the client. The configuration is the following.
NFS Server
Fedora Linux 38
Folder /home/user/nfs/
with mod 0777
IP address is 193.232.173.2
/etc/exports
content:
/home/user/nfs 193.232.173.251(rw,sync,no_acl,insecure,no_root_squash)
NFS Client
Diskless UNIX-based OS (oc2000, also known as RT OS BAGET, not UNIX itself but just UNIX-based)
IP address is 193.232.173.251
NFS is mounted via program code with the following command line:
mount -t nfs -o rsize=4096,wsize=4096 193.232.173.2:/home/user/nfs /nfs
No more command line options are available
Result
NFS is mounted but client cannot read/write (also via program code). I found out (in the Forum) that NFS server hadn’t supported version 2 of NFS and client worked ONLY with NFSv2.
I built Linux kernel (version 6.6.8) with NFSv2 support, but the client only sends the command above pending any response which is not coming!
systemctl status nfs-mountd.service
dumps the following
янв 26 15:38:14 fedora systemd[1]: Starting nfs-mountd.service - NFS Mount Daemon...
янв 26 15:38:14 fedora rpc.mountd[17297]: Version 2.6.3 starting
янв 26 15:38:14 fedora systemd[1]: Started nfs-mountd.service - NFS Mount Daemon.
янв 26 15:39:34 fedora rpc.mountd[17297]: v4root_create: path '/' flags 0x12403
янв 26 15:39:34 fedora rpc.mountd[17297]: v4root_create: path '/home' flags 0x10403
янв 26 15:39:34 fedora rpc.mountd[17297]: v4root_create: path '/home/user' flags 0x10403
янв 26 15:39:34 fedora rpc.mountd[17297]: successful authentication for IP 193.232.173.251 as 193.232.173.251
янв 26 15:39:34 fedora rpc.mountd[17297]: auth_unix_ip: client 0x55b7c3ba30e0 '193.232.173.251'
янв 26 15:39:34 fedora rpc.mountd[17297]: nfsd_fh: inbuf '193.232.173.251 4 \x408a0300938534b9'
янв 26 15:39:34 fedora rpc.mountd[17297]: nfsd_fh: found 0x55b7c3ba0490 path /home/user/nfs
янв 26 15:39:34 fedora rpc.mountd[17297]: nfsd_export: inbuf '193.232.173.251 /home/user/nfs'
янв 26 15:39:34 fedora rpc.mountd[17297]: granted access to /home/user/nfs for 193.232.173.251
янв 26 15:39:34 fedora rpc.mountd[17297]: nfsd_export: found 0x55b7c3ba0480 path /home/user/nfs
rpcinfo -p
is
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
100024 1 udp 44697 status
100024 1 tcp 37411 status
100005 2 udp 20048 mountd
100005 2 tcp 20048 mountd
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 60925 nlockmgr
100021 3 udp 60925 nlockmgr
100021 4 udp 60925 nlockmgr
100021 1 tcp 46315 nlockmgr
100021 3 tcp 46315 nlockmgr
100021 4 tcp 46315 nlockmgr
I tried combinations of client options in /etc/export
– didn’t help.
I tried to toggle settings in /etc/nfs.conf
– didn’t help too.
[nfsd]
section of /etc/nfs.conf
is the following:
debug=1
udp=on
tcp=on
vers2=y
vers3=n
vers4=n
vers4.0=n
vers4.1=n
vers4.2=n
rdma=y
rdma-port=20049
I even looked Linux source code up to find message given above – no result
tcmpdump
shows the following
tcpdump host 193.232.173.251 -vv
dropped privs to tcpdump
tcpdump: listening on enp1s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
16:27:04.817300 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has fedora tell 193.232.173.251, length 46
16:27:04.817319 ARP, Ethernet (len 6), IPv4 (len 4), Reply fedora is-at b0:0c:d1:60:d6:96 (oui Unknown), length 28
16:27:04.817485 IP (tos 0x0, ttl 64, id 9, offset 0, flags [none], proto UDP (17), length 104)
193.232.173.251.1023 > fedora.sunrpc: [udp sum ok] UDP, length 76
16:27:04.817747 IP (tos 0x0, ttl 64, id 39063, offset 0, flags [DF], proto UDP (17), length 56)
fedora.sunrpc > 193.232.173.251.1023: [bad udp cksum 0xdf04 -> 0xcf15!] UDP, length 28
16:27:04.817894 IP (tos 0x0, ttl 64, id 10, offset 0, flags [none], proto UDP (17), length 108)
193.232.173.251.1023 > fedora.mountd: [udp sum ok] UDP, length 80
16:27:04.818681 IP (tos 0x0, ttl 64, id 39064, offset 0, flags [DF], proto UDP (17), length 88)
fedora.mountd > 193.232.173.251.1023: [bad udp cksum 0xdf24 -> 0xbe7a!] UDP, length 60
16:27:04.818835 IP (tos 0x0, ttl 64, id 11, offset 0, flags [none], proto UDP (17), length 104)
193.232.173.251.1023 > fedora.sunrpc: [udp sum ok] UDP, length 76
16:27:04.818926 IP (tos 0x0, ttl 64, id 39065, offset 0, flags [DF], proto UDP (17), length 56)
fedora.sunrpc > 193.232.173.251.1023: [bad udp cksum 0xdf04 -> 0x1563!] UDP, length 28
16:27:04.819170 IP (tos 0x0, ttl 64, id 12, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:04.819217 IP (tos 0x0, ttl 64, id 39066, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:27:04.940992 IP (tos 0x0, ttl 1, id 35955, offset 0, flags [DF], proto TCP (6), length 64)
fedora.44608 > 193.232.173.251.hostmon: Flags [S], cksum 0xdf01 (incorrect -> 0xd811), seq 2813554343, win 32120, options [mss 1460,sackOK,TS val 1647224042 ecr 0,nop,wscale 7,tfo cookiereq,nop,nop], length 0
16:27:04.941154 IP (tos 0x0, ttl 64, id 13, offset 0, flags [none], proto TCP (6), length 40)
193.232.173.251.hostmon > fedora.44608: Flags [R.], cksum 0xf779 (correct), seq 0, ack 2813554344, win 0, length 0
16:27:05.827297 IP (tos 0x0, ttl 64, id 14, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:05.827425 IP (tos 0x0, ttl 64, id 39377, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:27:07.837298 IP (tos 0x0, ttl 64, id 15, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:07.837426 IP (tos 0x0, ttl 64, id 41000, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:27:10.240180 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 193.232.173.251 tell fedora, length 28
16:27:10.240329 ARP, Ethernet (len 6), IPv4 (len 4), Reply 193.232.173.251 is-at 00:00:00:00:00:36 (oui Ethernet), length 46
16:27:11.847303 IP (tos 0x0, ttl 64, id 16, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:11.847402 IP (tos 0x0, ttl 64, id 44262, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:27:19.857325 IP (tos 0x0, ttl 64, id 17, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:19.857436 IP (tos 0x0, ttl 64, id 50527, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:27:35.867363 IP (tos 0x0, ttl 64, id 18, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:27:35.867475 IP (tos 0x0, ttl 64, id 55909, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:28:07.877444 IP (tos 0x0, ttl 64, id 19, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:28:07.877674 IP (tos 0x0, ttl 64, id 5399, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:28:13.216264 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 193.232.173.251 tell fedora, length 28
16:28:13.216353 ARP, Ethernet (len 6), IPv4 (len 4), Reply 193.232.173.251 is-at 00:00:00:00:00:36 (oui Ethernet), length 46
16:29:11.888133 IP (tos 0x0, ttl 64, id 20, offset 0, flags [none], proto UDP (17), length 120)
193.232.173.251.1024 > fedora.nfs: NFS request xid 1649760493 92 getattr fh Unknown/01000400408A0300938534B90000000000000000000000000000000000000000
16:29:11.888287 IP (tos 0x0, ttl 64, id 52443, offset 0, flags [DF], proto UDP (17), length 28)
fedora.nfs > 193.232.173.251.1024: [udp sum ok] UDP, length 0
16:29:17.216622 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 193.232.173.251 tell fedora, length 28
16:29:17.216763 ARP, Ethernet (len 6), IPv4 (len 4), Reply 193.232.173.251 is-at 00:00:00:00:00:36 (oui Ethernet), length 46```
Could you please help me? What else should I do to make client and server work by NFS?