What's new

Any possible way to mount nfs shares on to router?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

nphil

New Around Here
I'm looking for a way to mount an nfs share on my NAS to my router. The reason for this being that the NAS is already overloaded with stuff and I've setup entware+chrooted debian on merlin's fw to run sonarr. Sonarr is just a grabber and organizer so no issues with downloading files to the NAS, just rename+move.

The issue is that I'm unable to mount the NFS share from my NAS onto my router automatically after boot. I can do it manually after boot, but I need to set it up to remount automatically.

So far I've tried:

1. Editing the /jffs/configs/fstab file and making it wait for network, but it doesn't work (I'm assuming because the NAS is connected to the router)

2. Adding a simple mount command to mount the share in the services-start jffs script but this doesn't work either.

Looking at the log, it seems like statd is loaded at the end, way after services-start, so it might be why the nfs mount fails. I need the mount command to be the LAST thing to run at the end of boot, which script should I put the mount command in? I tried a bunch of different script files like wan-start but, same results.

This works when mounting a samba share, but I want to get nfs to work.

Please advise, I'm still learning and new to this.
 
Last edited:
here's what post-mount looks like. i'm using a swap partition and chroot debian, sonarr is inside debian which is why it needs the nfs mount first

#!/bin/sh
swapon /dev/sda5
if [ $1 = "/tmp/mnt/sda6" ]
then
ln -nsf $1/entware.arm /tmp/opt
fi
mount 192.168.1.132:/export/MYCLOUD /mnt/nfs
sleep 10
/opt/etc/init.d/S99debian start
sleep 30
/opt/etc/init.d/rc.unslung restart
 
Enable NFS support on the webui if you haven't done so, so the required services do start.

Also, you might need to specify the NFS protocol version, as the defaults with this old kernel might be different from what your newer server uses.

Check the system log on both the router (client) and the server, as they might reveal different hints.
 
Enable NFS support on the webui if you haven't done so, so the required services do start.

Also, you might need to specify the NFS protocol version, as the defaults with this old kernel might be different from what your newer server uses.

Check the system log on both the router (client) and the server, as they might reveal different hints.

Thank you so much! You were right, i needed to specify the version and I also added _netdev to make sure the network was up before trying to mount the share.

To anyone else with the same need here is what I added to my post-mount script:

mount -t nfs 192.168.1.132:/export/MYCLOUD /mnt/nfs -o nfsvers=3,nolock,_netdev,rsize=8192,wsize=8192

The nfs mount works properly on boot now and I can access it from the chrooted debian installation without a ton of permission issues, unlike samba.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top