I want to configure NFS server on my R6220 router. Unfortunately not all necessary components were available "out of the box". Mainly "nfs-server" was missing. So I did checkout 18.06.1, compiled it by my self and installed it on my router (with all needed dependencies; modules, libs based on nfs guide and what 'opkg' threw me).
Everything looks configured properly but when I trying to mount something I continuously got error: "Program not registered".
Here is some info:
root@OpenWrt:/# ps |grep rpc
684 root 0 IW< [rpciod]
1758 rpc 1164 S /usr/sbin/portmap -f
3790 rpc 1280 S /usr/sbin/rpcbind -f -w
3817 root 1536 S /sbin/rpcd -s /var/run/ubus.sock -t 30
3862 root 1612 S /usr/sbin/rpc.statd -p 32778 -o 32779 -F
3863 root 1876 S /usr/sbin/rpc.mountd -p 32780 -F
root@OpenWrt:/# showmount --all
clnt_create: RPC: Timed out
root@OpenWrt:/# netstat -an |grep 327
tcp 0 0 0.0.0.0:32777 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32778 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32780 0.0.0.0:* LISTEN
tcp 0 0 :::32777 :::* LISTEN
tcp 0 0 :::32778 :::* LISTEN
tcp 0 0 :::32780 :::* LISTEN
udp 0 0 0.0.0.0:32777 0.0.0.0:*
udp 0 0 0.0.0.0:32778 0.0.0.0:*
udp 0 0 0.0.0.0:32780 0.0.0.0:*
udp 0 0 :::32777 :::*
udp 0 0 :::32778 :::*
udp 0 0 :::32780 :::*
root@OpenWrt:/etc# cat exports
/mnt/sda4 *(rw,sync)
# dummy dir for test
/mnt/blah *(ro,all_squash,insecure,sync)
root@OpenWrt:/# lsmod |grep nfs
dns_resolver 3792 1 nfsv4
lockd 50880 3 nfsv3,nfsd,nfs
nfs 116240 2 nfsv4,nfsv3
nfsd 73792 11
nfsv3 17856 0
nfsv4 127536 0
sunrpc 155712 15 nfsv4,nfsv3,nfsd,nfs,lockd
Client side:
$ rpcinfo 192.168.1.1
program version netid address service owner
100000 2 tcp 0.0.0.0.0.111 portmapper unknown
100000 2 udp 0.0.0.0.0.111 portmapper unknown
$ sudo mount -v -t nfs -o auto 192.168.1.1:/mnt/sda4 /mnt/DATA/
mount.nfs: timeout set for Sat Feb 15 21:44:01 2019
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.Program not registered168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Program not registered
mount.nfs: requested NFS version or transport protocol is not supported
I got same behavior when I'm trying to mount it locally in router so I think it's not firewall or any other connectivity problem.
I'm using Netgear R6220 with:
PRETTY_NAME="OpenWrt 18.06.1"
BUILD_ID="r7258-5eb055306f"
LEDE_BOARD="ramips/mt7621"
LEDE_RELEASE="OpenWrt 18.06.1 r7258-5eb055306f"