NFS share - error for nfsd start

I followed the instructions here
https://openwrt.org/docs/guide-user/services/nas/nfs_configuration
Here is my /etc/exports

/mnt    *(ro,all_squash,insecure,sync)
/mnt/sda4 10.0.0.1/24(rw,sync,no_subtree_check)

The problem is: after restoring some old router configuration I cannot properly share my NFS drive.

When I ssh into my OpenWRT router:
If I run ps the following entries are not present

/usr/sbin/rpc.statd -p 32778 -o 32779
/usr/sbin/portmap

but this one is there

/usr/sbin/rpc.mountd -p 32780    

I can also restart the services manually with

root@10.0.0.1:~# service rpcbind start && service rpcbind enable
root@10.0.0.1:~# service nfsd start && service nfsd enable

but I get this output for the service nfsd start

chown: unknown user/group nfs:nfs
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/mnt".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd

if I do

cat /ext/group

I get

cat /etc/group
root:x:0:
daemon:x:1:
adm:x:4:
mail:x:8:
dialout:x:20:
audio:x:29:
www-data:x:33:
ftp:x:55:
users:x:100:
network:x:101:
nogroup:x:65534:
ntp:x:123:ntp
dnsmasq:x:453:dnsmasq
docker:x:65536:docker
unbound:x:65537:unbound
logd:x:514:logd
ubus:x:81:ubus

On my windows client I get this

>> mount.exe -o anon \\10.0.0.1\mnt\sda4\ n:
Network Error - 1225

Type 'NET HELPMSG 1225' for more information.

>> NET HELPMSG 1225

The remote computer refused the network connection.

What to do?

I am aftaid there is no such thing as "NFS share"

Obviously with portmapper not running clients cannot determine other rpc daemon ports, not mount or lock anything.

I am aftaid there is no such thing as "NFS share"

What do you mean? I suppose there might be other terms for it, but since "NFS share configuration" is the name given in https://openwrt.org/docs/guide-user/services/nas/nfs_configuration and I am a neophyte, I choose to stick to it

Obviously with portmapper not running clients cannot determine other rpc
daemon ports, not mount or lock anything.

Could you explain it in a simpler way? Still, I wonder why the portmapper is not running, could you help me figure out why?

I suppose I don't have a clean install right now. I made a configuration backup last month. (Luci → System → Backup/Flash Firmware → Backup) At the time I didn't have some of the current packages installed in my openwrt system nor an NFS share, but I still decided to restore those old settings. (Luci → System → Backup/Flash Firmware → Restore // no factory reset before restore, I flashed an ext4 image instead of a squashfs one)
The portmapper and the NFS share I set up correctly 2 weeks ago got messed up after I restored the configuration settings from last month, hence this ticket.

You need to examine logread

rpcinfo -p 127.0.0.1 

should print all running sunrpc services - at least nfsd(v2/3/4) and mountd (v2/3) and portmapper itself.

root@OpenWrt:~#  rpcinfo -p 127.0.0.1 
127.0.0.1: RPC: Remote system error - Connection refused

You need to start portmapper first, then other services register their ports with it and show on the networks

How do I do it for OpenWrt 23.05.3, r23809-234f1a2efa?

service rpcbind start && service rpcbind enable

or something else?
If you had a link to some resources explaining the portmapper in simple way (for neophytes) I would also appreciate it.

https://man.archlinux.org/man/core/rpcbind/rpcbind.8.en

I couldn't wrap my head around it. I have just cloned an old image of my system SD card with balenaEtcher

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.