Problem: NFS export fails

On my Kimax device - with build-in Sata harddisk - with a recent OpenWrt (24.x), I installed NFS-server using 'opkg install nfs-kernel-server'.

After performing Extroot, the harddisk is mounted on /mnt/sda1.

In /etc/exports I added: /mnt/share 192.168.x.0/24(rw,all_squash,insecure,sync,no_subtree_check).

Google AI showed me the commands:
/etc/init.d/nfsd enable
/etc/init.d/nfsd start

But then I get the error: 'exportfs: /mnt/sda1 does not support NFS export'.

The same error I get with: 'exportfs -ra'.

Unfortunately I cannot find a solution for this.
How can I solve that problem?

Thank you in advance.

No justification for that. Did you follow AI-permutated instructions you have no recollection at all?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like

@brada4,
thank you for your reply.

I don't know what you mean by that; I am not native english.

Hereby the results you asked for.

ubus call system board

{
	"kernel": "6.6.93",
	"hostname": "Kimax_OpenWrt",
	"system": "MediaTek MT7620A ver:2 eco:6",
	"model": "Kimax U35WF",
	"board_name": "kimax,u35wf",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.2",
		"revision": "r28739-d9340319c6",
		"target": "ramips/mt7620",
		"description": "OpenWrt 24.10.2 r28739-d9340319c6",
		"builddate": "1750711236"
	}
}

cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd01:1764:c06a::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.178.17'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.178.1'
	list dns '192.168.178.1'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '0'

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/10180000.wmac'
	option band '2g'
	option channel '1'
	option htmode 'HT20'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

The wireless router in my device is not enabled (I don't used now).

cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ignore '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

cat /etc/config/firewall

config defaults
	option syn_flood	1
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	00:11:22:33:44:66
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		192.168.16.235
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port	80
#	option dest		wan
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp

I didn't change anything on the firewall; I guess it might not active, because the wireless router is not enabled / configured (?).

In the documentation under 'Troubleshooting' I see:
"use 'netstat -nlpu | grep rpcbind' to see wether rpcbind is actually listening on port 111 for both tcp and udp".
That command gives me:

udp     0     0 0.0.0.0:58966     0.0.0.0:*     6903/rpcbind
udp     0     0 0.0.0.0:111       0.0.0.0:*     6903/rpcbind
udp     0     0 :::111            :::*          6903/rpcbind
udp     0     0 :::64917          :::*          6903/rpcbind

So, tcp is missing here.

Suggest you sysupgrade to latest version - 24.10.4 - resettimng configuration.
Then partition, format and mount a storage drive https://openwrt.org/docs/guide-user/storage/usb-drives
Once there export new ext4 directory (like /mnt/sda1/nfs) https://openwrt.org/docs/guide-user/services/nas/nfs.server

You do not provise any source for "tcp is missing" having any impact on nfs.
Proper portmñpper diagnostics is rpcinfo -p 192.168.1.1

Hi brada4,
thank you for your suggestions.

First I have to explain more.
My device is not a regular router; it is a network drive with a build in Wifi router.
In there is a Sata hard disk build in, not USB.

Are you sure I can do that safely?
I recently installed OpenWrt on my Kimax using the latest firmware files.

When I tried to update some installed software I got several issues of 'Bad gateway' in my browser.
I found a solution to fix that.
On the forum I see warnings NOT to do that.

If you say yes for sysupgrade, which command(s) I must use then? I'm not so familiar with OpenWrt.

I already prepared the build in hard disk according the instructions found on https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

So I suppose the drive is already correct prepared and partitioned now.

I already read the documents https://openwrt.org/docs/guide-user/services/nas/nfs.server and https://openwrt.org/docs/guide-user/services/nas/nfs_configuration.

I already have a directory /mnt/sda1/videos, i will try that for the NFS config.

I executed rpcinfo -p 192.168.178.17 as you suggested. Result:

  program vers proto   port  service
    100000    4   tcp    111
    100000    3   tcp    111
    100000    2   tcp    111
    100000    4   udp    111
    100000    3   udp    111
    100000    2   udp    111
    100003    3   tcp   2049
    100003    4   tcp   2049
    100021    1   udp  32777
    100021    3   udp  32777
    100021    4   udp  32777
    100021    1   tcp  32777
    100021    3   tcp  32777
    100021    4   tcp  32777
    100024    1   udp  32778
    100024    1   tcp  32778
    100005    1   udp  32780
    100005    1   tcp  32780
    100005    2   udp  32780
    100005    2   tcp  32780
    100005    3   udp  32780
    100005    3   tcp  32780

So I would think that is correct, right?

@frollic,
thank you for the link, I will read that documentation.

@brada4,
I just tried a NFS-config with /mnt/sda1/nfs but 'exportfs -ra' gives me also: 'does not support NFS export'.

Sorry, but I am still unsure if I can safely do a sysupgrade, with my specific device.

You can not sysupgrade extroot.
I am suggesting to wipe extroot and go with minimal packages in machines 16MB flash.
I dont think you can even export layered overlayfs.
Uff yea you found what i suspected too.

rpc+nfs are ok.

I dunno if 64MB machine can mount xfs - that will not need fsck at boot. experiment a bit

Unfortunately, to me it looks like OpenWrt is only for specialists.

I tried to remove Firewall, because I don't need that in my Lan; but that failed and corrupted the system.
In the terminal I did: firstboot and reboot.

While NFS cannot work on my device, I will try (again) using FTP to manage files on the drive.

Actually I would need a simpler application to just use my device as a network drive, which also can run MiniDLNA.

16MB flash quite limits what you can install, but yes - nfs server AND minidlna fits it. next is RAM which would permit only one of these.

First we get to filesystem mounted, exported, mounted on other system

What is in

cat /etc/config/fstab 
mount -v

For upgrades (provided you get rid of extroot) you can use luci-app-attendedsysupgrade (any major feature has respective luci app, but we must be careful with small flash and ram)

@brada4,
thank you for still 'being with me'.

I have looked at DD-Wrt and Tomato, but both don't have a firmware for my Kimax; so I must stick to OpenWrt.

I am back logged in to my device. The results of the commands you asked:
cat /etc/config/fstab

config 'global'
	option	anon_swap	'0'
	option	anon_mount	'0'
	option	auto_swap	'1'
	option	auto_mount	'1'
	option	delay_root	'5'
	option	check_fs	'0'
config 'mount'
	option	target	'/mnt/sda1'
	option	uuid	'2e5105b2-e623-4d62-bde7-e98b63b11157'
	option	enabled	'0'

mount -v

/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work,uuid=on)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)

This looks okay?

Instead of using miniDLNA, I can also use Jellyfin on another computer. But then I would need NFS to connect with Jellyfin.
Do you think that would be doable?

Looks good.
Now lets cut out USB part of https://openwrt.org/docs/guide-user/storage/usb-drives

install block-mount
run block info - disregard result for now

install ext4 tools, kernel driver (not f2fs, no usb drivers, no ex/vfat)

If you intend to have only single partition you actually can set filesystem on /dev/sda without partitions. But ok, go with the flow....

Once filesystem is mounted over reboot - off - unmount it and fsck, then enable fsck (helps with power cut, takes time, but at least mounts)

Install nfs-kernel-server and export filesystem.
...
Run rpcinfo from the client before mounting....

block-mount is/was already installed.

block-info mention on last line:
/dev/sda1: UUID="2e5105b2-e623-4d62-bde7-e98b63b11157" LABEL="extroot" VERSION="1.0" TYPE="ext4"
but I think only the Label is 'extroot'.

Sorry, thats not clear to me; which commands for those?

f2fs: nothing installed.
About USB:
'kmod-usb-core', 'kmod-usb-ehci', 'kmod-usb-ohci', 'kmod-usb-storage' and 'kmod-usb2' are installed.

My device has also an USB-port 3.0 in it, it is possible that the Sata interface goes over that USB 3.

Should I remove all 5 packages containing 'usb'?

You have SATA drive, you do not need USB-STORAGE for USB external disk.

Okay, I removed all 5.
What do you mean with 'mounted over reboot - off - unmount it and fsck'?
What must I do?

Once you mount filesystem, before exporting NFS - do a reboot to make sure it sticks, and unmount and check the filesystem to verify all tools do work....

Thank you for clarifying.
I will do that tomorrow (now its bed time).

1 Like

I just removed 'kmod-fs-vfat' as not needed like you mentioned earlier.

Currently 'kmod-fs-ext4' is installed.
There is also a package 'libext2fs2' (a library which can access ext2, ext3 and ext4 filesystems) - not installed yet.
But as you mentioned earlier 'Not f2fs', this should not be installed, correct?

At this point the preparation to mount /mnt/sda1 is correct?

That ext2 lib is ok, as a dependency

Donot install "other" filesystem tools - for vfat/exfat/xfs/f2fs/btrfs , only ext4(includes ext2 and ext3 support)

I just mounted /mnt/sda1 and rebooted; drive is still mounted, so thats good.

'fsck' is not found. Available to install:
f2fsck 76.70 KiB Utility for checking/repairing a Flash-Friendly File System (F2FS)
f2fsck-selinux 77.17 KiB Utility for checking/repairing a Flash-Friendly File System (F2FS) with SELinux support
hfsfsck 90.23 KiB Utilities to create and check HFS/HFS+ filesystems.…
xfs-fsck 541.77 KiB Utilities for checking and repairing XFS filesystems

Which one to install? The top 2 do not qualify (f2fs) ?
The last one is a big one.

When /mnt/sda1 is mounted, in LuCi Overview shows:

Memory
  Total available	48.96 MiB / 118.48 MiB (41%)
  Used		95.62 MiB / 118.48 MiB (80%)
  Buffered	52.00 KiB / 118.48 MiB (0%)
  Cached		29.54 MiB / 118.48 MiB (24%)

Storage
  Disk space	804.00 KiB / 9.13 MiB (8%)
  Temp space	184 KiB / 59.24 MiB (0%)
  /mnt/sda1   28.56 MiB / 3.58 TiM (0%)

Do I have enough memory available to install one of those 'fsck' packages?