NFS Sharing a USB HDD connected to Openwrt device

Hi Everyone,

I have a Linksys WRT1900 ACS, and a 1 TB HDD in a USB Enclosure, the HDD is connected to the linksys device and there is one ext4 partition on it and it is mounted on /mnt/external_storage.

I'm trying to NFS share this /mnt/external_storage (which is the HDD), below is my /etc/exports


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

When i try to mount it from a laptop on the network i get below error:

root@f5Laptop:~# mount -v 10.10.10.1:/mnt/external_storage/ /home/frisky5/share
mount.nfs: timeout set for Wed Dec 22 14:49:24 2021
mount.nfs: trying text-based options 'vers=4.2,addr=10.10.10.1,clientaddr=10.10.10.13'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=10.10.10.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.10.10.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.10.10.1 prog 100005 vers 3 prot UDP port 32780
mount.nfs: mount(2): Device or resource busy

Below is my mount output

root@f5EdgeRouter:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
ubi1:syscfg on /tmp/syscfg type ubifs (rw,relatime,assert=read-only,ubi=1,vol=0)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
/dev/sda1 on /mnt/external_storage type ext4 (rw,relatime,stripe=8191)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

Is there a /home/frisky5/share directory?

Yes there is, i am able to mount now after i edited the exports on openwrt as below:

/mnt/exthdd    f5Laptop(rw,insecure,sync,all_squash,anonuid=0,anongid=0,no_subtree_check,fsid=0,crossmnt)

Also the mount works if i add it in my laptop (f5Laptop) in the fstab in etc as below:

f5EdgeRouter:/mnt/exthdd /home/frisky5/share nfs rw,exec,hard,intr,timeo=14 0 0

but still if i use mount command it gives resource busy, but for me if it auto mounted on boot with fstab then it is fine, but still wondering why mount command won't work.
I'm using this HDD as storage for KVM images that are used by the VMs on my laptop and it is actually working pretty good. I'm still new to openwrt and am already loving it!

I am on NFS at the time as well.
Did you read the following how-to?
I followed step by step this one:
Using storage devices
For information:
Installing and troubleshooting USB Drivers
Then
NFS share configuration
Network File System (NFS)

Do you know autofs in the client to auto-mount. Easy and clever. I recommend it.

1 Like

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