"/mnt/nvme1 does not support NFS export"

Running an OpenWRT (24.10.0) One here with a 256GB M.2 NVMe card installed.
The /etc/exports contains:

/mnt/nvme1    *(rw,insecure,no_root_squash,no_subtree_check,sync,fsid=0)

showmount reports:

root@OpenWrt-One:~# showmount -e localhost
Export list for localhost:
/mnt/nvme1 *
root@OpenWrt-One:~# 

... but exportfs reports this:

root@OpenWrt-One:~# exportfs -ra
exportfs: /mnt/nvme1 does not support NFS export
root@OpenWrt-One:~# 

Have I misunderstood something? Or not installed all the required drivers?
Can/should the nvme support an NFS export?

Regards, Martin

hi, what kind of file system you used for nvme1 ?

1 Like

Thank for getting back.
I though I had ext4. But on checking, I'm not sure.
Can you offer a check-list to provision a new nvme card. Spending the last couple of hours read the multitude of tutorials on setting up usb disc storage, I am lost!
Regards, M.

Are you sure backing store is already mounted?

So please either mount | grep nvme or check via LuCI -> System -> Mount Points.

1 Like

Via LuCI:

...BUT

root@OpenWrt-One:/mnt# mount
/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/ubi0_5 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=5)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work,xino=off)
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)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,noatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
root@OpenWrt-One:/mnt# 

No mounted nvme?

Install `fdisk`, `kmod-fs-ext4`, `e2fsprogs`, and `block-mount`

Delete existing partition: 
`fdisk /dev/nvme0n1`
Press `d` to delete the current partition
Press `w` to write changes and exit `fdisk`

Create a New partition:
Relaunch `fdisk /dev/nvme0n1`
Press `n` to create a new partition. Follow the steps to use the default start and specify partition size (e.g. +1000GB)
Press `t` to change partition type - default should be ext4 (change if needed)
Press `w` to write changes and exit `fdisk`
`df -h` to verify partition.

Format the partition:
`mkfs.ext4 /dev/nvme0n1p1`

Create mount point:
`mkdir -p /mnt/ssd`

Configure `fstab` for Auto-mount:
`block info` and copy the UUID of your SSD

Configure `fstab` for Auto-mount:
`nano /etc/config/fstab`
Add to the end:

config mount
        option target '/mnt/ssd'
        option uuid 'add your UUID'
        option enabled '1'

save and exit
reboot

Do I want to remove signature?

root@OpenWrt-One:~# fdisk /dev/nvme0n1

Welcome to fdisk (util-linux 2.40.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS (MBR) disklabel with disk identifier 0x506a426c.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-500118191, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-500118191, default 500118191): 

Created a new partition 1 of type 'Linux' and of size 238.5 GiB.
Partition #1 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: 

Looks like this came raw.
Respond Yes and report back.

You can cr#ate filesystem on whole disk.

... continuing from -t (change partition type)

Aliases:
   linux          - 83
   swap           - 82
   extended       - 05
   uefi           - EF
   raid           - FD
   lvm            - 8E
   linuxex        - 85
Hex code or alias (type L to list all): linux
Changed type of partition 'Linux' to 'Linux'.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@OpenWrt-One:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.8M      4.8M         0 100% /rom
tmpfs                   493.8M      1.3M    492.5M   0% /tmp
/dev/ubi0_5             200.8M      4.2M    191.9M   2% /overlay
overlayfs:/overlay      200.8M      4.2M    191.9M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt-One:~#

df doesn't look right?

fdisk is baulking at whole disk...

root@OpenWrt-One:~# fdisk /dev/nvme0

Welcome to fdisk (util-linux 2.40.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

fdisk: cannot open /dev/nvme0: Invalid seek
root@OpenWrt-One:~# 
mkfs.ext4 /dev/nvme0n1p1

mkdir /mnt/nvme

mount /dev/nvme0n1p1 /mnt/nvme

df -h

Thank you all very much.
All working now! I don't think others will lean much from this conversation - except that I was probably not very logical in setting up my NFS share :blush:

Regards, M.

Yes. That was why I told you to respond [Yes]. It probably would have been OK to say [No], but I really wasn't sure how you originally provisioned it.