Problem: NFS export still fails

Contrary to what I thought yesterday, the problem with NSF export has not been solved yet.
After closing my previous topic 'Problem: NFS export fails' (yesterday), the NFS export unfortunately still appears to be failing.

Installed NFS on my Kimax device:

opkg list-installed | grep -- nfs
kmod-fs-nfs - 6.6.110-r1
kmod-fs-nfs-common - 6.6.110-r1
kmod-fs-nfs-common-rpcsec - 6.6.110-r1
kmod-fs-nfs-v4 - 6.6.110-r1
kmod-fs-nfsd - 6.6.110-r1
nfs-kernel-server - 2.6.2-r4
nfs-kernel-server-utils - 2.6.2-r4
nfs-utils-libs - 2.6.2-r4
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 /rom/overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
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)
/dev/sda1 on /mnt/sda1 type ext4 (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

My export file:

cat /etc/exports
# /mnt	*(ro,all_squash,insecure,sync)
/mnt/sda1 192.168.178.0/24(rw,no_root_squash,insecure,no_subtree_check,sync,fsid=2)

Try mounting on my Linux PC:

sudo mount -t nfs -v -o vers=4 192.168.178.17:/mnt/sda /mnt/NFS
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.178.17,clientaddr=192.168.178.53'
mount.nfs: mount(2): No such file or directory
mount.nfs: mounting 192.168.178.17:/mnt/sda failed, reason given by server: No such file or directory

At the bottom of Logread in OpenWrt:
daemon.warn rpc.mountd[3257]: Cannot export /, possibly unsupported filesystem or fsid= required

The filesystem in use is Ext4.
I use fsid=2 in the export file.
I don't use just '/' but /mnt/sda1 in the export file.

So I really don't understand the problem. And I also cannot find a fix for that.

it is /mnt/sda1....

Well yes thats correct,, I forgot the 1 there; but before that I also tested using /mnt/sda1 and that gives the same result.

I can't find any logical explanation.

remove fsid parameter?

I also tried without the fsid parameter; makes also no difference.

According to the message in Logread, the program think I am using only '/' (?).

After a change in /exports I use /etc/init.d/nfsd restart.

Could it also be neccessary to restart 'nfs-kernel-server'?
I don't know the command for that; can't find the location of it either.

rpcinfo -p 192.168.178.17
showmount -a 192.168.178.17

The results from my PC:

rpcinfo -p 192.168.178.17
   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
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp  32777  nlockmgr
    100021    3   udp  32777  nlockmgr
    100021    4   udp  32777  nlockmgr
    100021    1   tcp  32777  nlockmgr
    100021    3   tcp  32777  nlockmgr
    100021    4   tcp  32777  nlockmgr
    100024    1   udp  32778  status
    100024    1   tcp  32778  status
    100005    1   udp  32780  mountd
    100005    1   tcp  32780  mountd
    100005    2   udp  32780  mountd
    100005    2   tcp  32780  mountd
    100005    3   udp  32780  mountd
    100005    3   tcp  32780  mountd
showmount -a 192.168.178.17
All mount points on 192.168.178.17:
showmount -e 192.168.178.17
Export list for 192.168.178.17:
/mnt/sda1 192.168.178.0/24

Run
exportfs -a then showmount -e ...
current "error" is nothing exported.

I suppose you mean exportfs -a in OpenWrt and showmount -e ... on me PC, then in OpenWrt showmount does not exist.

I ran both commands:
exportfs -a gives the same error-message 'Cannot export / ....' in Logread as mentioned in my first post.
showmount -e 192.168.178.17 shows the same as in my previous post.

How can I discover why nothing gets exported?

According to https://openwrt.org/docs/guide-user/services/nas/nfs_configuration I just did:
chmod -R a+rw /mnt/sda1
But in the Logread still the same error 'Cannot export / ...'.

I dont know, only difference I do is i dont specify type or protocol versions ie
mount server:/export /mnt/nfs
one day with upgrade i found default turned NFS4 from NFS3 without action on my side....

Hi brada4,
I just used the command: parted -l /dev/sda1
Besides info of the HDD I got about 6 errors like ...
Error: /dev/mtdblock1: unrecognised disk label
(6 in total).

Does this mean my OpenWrt system is failing?
Should I reflash the firmware again?

No, it somehow tries to access mtdblock1 instead. Do you have something like blkid / mdadm / lvm installed?

Just libblkid1 is installed (already).
I just installed blkid; running that gives me:

/dev/sda1: UUID="865bf95e-80d6-49a3-83df-cfbfac264400" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="openwrt" PARTUUID="596c85d4-a604-4bd5-b899-aa66bb3675b5"
/dev/mtdblock5: BLOCK_SIZE="262144" TYPE="squashfs"

But nothing about the other 5 mtdblocks (??).

blkid is within its right to detect mtd block devices, but it should not happen at the instant of NFS export or mount....

@brada4,
in the meantime I have repartitioned my Sata HDD, did the mounting options overnew, set the mountpoint to /mnt/sata and changed the NFS-config.
Then I ran exportfs -ra.
But unfortunately it was to no avail; still the same error as before.

Maybe important in this, my Sata HDD is 4 TB; could that be a problem?

If you also have no more ideas, then I maybe better reflash again with the original firmware version '24.10.2' (?).

No need to downgrade, besides few fixes in new version they are equivalent. You have no configuration whatsoever to export / :frowning:

Yeah, but why OpenWrt doesn't give me any information where the problem is.

1 Like

Lets wait for somebody smarter to chime in.