What's new

NFS client in 386.3 firmware

  • 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!

dlukanidin

Occasional Visitor
Hello, I tried to mount external NFS folder in router

Code:
mount -t nfs 192.168.0.234:/User/admin/share /mnt/NFS

and have an error:
Code:
mounting 192.168.0.234:/User/admin/share on /mnt/NFS failed: No such device

is does mean that firmware not support NFS client?
 
RT-AC86U
 
You need to enter this command:
Code:
insmod nfs.ko
EDIT: Use modprobe instead of insmod:
Code:
modprobe nfs
 
Last edited:
I try, result:
Code:
insmod: can't insert '/lib/modules/4.1.27/kernel/fs/nfs/nfs.ko': unknown symbol in module, or unknown parameter
 
Looks like a bug on the RT-AC86U. It works on my RT-AX86U.
to see if i could repro, i tried
Code:
modprobe nfs
modprobe nfs.ko
(neither errored), and now insmod tells me file exists. i don't have any nfs shares handy to attempt mounting to see if it worked
 
OK, got it. There's a module dependency.

You need to enable the NFS server at USB Application > Servers Center > NFS Exports. Then do the insmod nfs.

EDIT: Use modprobe rather than insmod.
 
Last edited:
to see if i could repro, i tried
Code:
modprobe nfs
modprobe nfs.ko
(neither errored), and now insmod tells me file exists. i don't have any nfs shares handy to attempt mounting to see if it worked

Thanks it works, lsmod:

Bash:
Module                  Size  Used by    Tainted: P 
nfs                   136837  0
lockd                  69416  1 nfs
grace                   1837  1 lockd
sunrpc                201908  2 nfs,lockd
sr_mod                 14651  0
cdrom                  29593  1 sr_mod
nf_nat_sip              9580  0
nf_conntrack_sip       23456  1 nf_nat_sip
nf_nat_h323             6967  0
nf_conntrack_h323      41636  1 nf_nat_h323
nf_nat_rtsp             4544  0
nf_conntrack_rtsp       7883  1 nf_nat_rtsp
nf_nat_ftp              2099  0
nf_conntrack_ftp        7469  1 nf_nat_ftp
thfsplus              102213  0
tntfs                 473054  1
tfat                  280094  0
usb_storage            51327  1
sg                     28440  0
sd_mod                 31029  1
scsi_mod              171795  4 sr_mod,usb_storage,sg,sd_mod
cdc_mbim                5340  0
qmi_wwan               14225  0
cdc_wdm                10545  2 cdc_mbim,qmi_wwan
cdc_ncm                16787  1 cdc_mbim
rndis_host              6121  0
cdc_ether               4864  1 rndis_host
ax88179_178a           16220  0
asix                   22821  0
libphy                 27553  1 asix
cdc_acm                18347  0
usbnet                 21058  7 cdc_mbim,qmi_wwan,cdc_ncm,rndis_host,cdc_ether,ax88179_178a,asix
mii                     4341  3 ax88179_178a,asix,usbnet
bcm_usb                 1465  0
ohci_platform           5283  0
ohci_hcd               31908  1 ohci_platform
ehci_platform           5831  0
ehci_hcd               40689  1 ehci_platform
usbcore               165031 15 usb_storage,cdc_mbim,qmi_wwan,cdc_wdm,cdc_ncm,rndis_host,cdc_ether,ax88179_178a,asix,cdc_acm,usbnet,ohci_platform,ohci_hcd,ehci_platform,ehci_hcd
usb_common              2813  1 usbcore
dhd                  1565591  0
dpsta                  19450  1 dhd
igs                    13292  1 dhd
emf                    24046  2 dhd,igs
hnd                   281778  3 dpsta,igs,emf
rdpa_cmd               62087  0
bcm_thermal             4801  0
bcmspu                 57132  0
bcmpdc                  7810  1 bcmspu
pwrmngtd                2672  0
bcmvlan                85893  0
wfd                    16582  1 dhd
bcmmcast               58984  2 dhd
nciTMSkmod            411778  0
pktrunner             185839  0
bcm_enet             1038206  0
pktflow               119654  1 pktrunner
chipinfo                1534  0
rdpa_mw                21123  0
rdpa                 1089558  2 wfd,bcm_enet
rdpa_gpl_ext            1161  0
rdpa_gpl               19312  8 dhd,rdpa_cmd,bcmvlan,wfd,pktrunner,bcm_enet,rdpa_mw,rdpa
bdmf                 1225844  8 dhd,rdpa_cmd,wfd,pktrunner,bcm_enet,rdpa_mw,rdpa,rdpa_gpl
rdp_fpm                22972  1 rdpa
wlcsm                  15535 72 dhd,hn

showmount -e 192.168.0.234

Code:
Export list for 192.168.0.234:
/Users/admin/share 192.168.0.0

ls -al /tmp/mnt

Code:
drwxrwxrwx    4 admin    root            80 Aug 12 02:07 .
drwxrwxrwx   19 admin    root          1420 Aug 12 16:08 ..
drwxrwxrwx    1 admin    root          4096 Aug  6 13:28 ASUS
drwxrwxrwx    2 admin    root            40 Aug 12 02:07 NFS

mount -t nfs4 192.168.0.234:/Users/admin/share /mnt/NFS
result: no answer, no prompt in 5 minutes

try twice with same result
 
OK, got it. There's a module dependency.

You need to enable the NFS server at USB Application > Servers Center > NFS Exports. Then do the insmod nfs.
Thank you so much this works !!!
I think this may be a good opportunity to run a script like save_nvram for a router to which there is no physical access.
 
Yes, I have saved nvram configuration with script directly from router to my macbook.

Thanks to

ColinTaylor

and

Jack Yaz

once more!!!
 
Some problem else

If I have no memory stick in router, nothing work

on mount I have 'connection refesed'
I tried to to export with nfs for /jffs/tmp by adding file expots.add to start normal nfsd, but have no result else
 
I just ran across this here today -- trying to get my RT-AX86U to mount a remote NFS share. So I went through that nfsd startup routine (linked above) and produced a simple shell script to start up NFS on the router. Posting it here for others.

One would still have to arrange for this to be run automatically if desired, perhaps from something in /jffs/scripts/
 

Attachments

  • start_nfs.sh.txt
    516 bytes · Views: 161
my scripts:
start_nfs.sh - for router with usb memory stick connected
start_nfsd.sh - for router without usb memory stick connected

tested with RT-AC66U-B1, RT-AC86U, RT-AC88U
 

Attachments

  • start_nfs.sh.txt
    705 bytes · Views: 140
  • start_nfsd.sh.txt
    1.6 KB · Views: 145
It would be great if this function was implemented in the WebUI, and on this mount point it was possible to activate miniDLNA and SAMBA server.
 
Probably not a good idea to create a network filesystem from another network filesystem. Might as well just run Samba on the host machine.
this "tricycle" - necessity:
NFS NAS via WiFi
IP cams via WiFi, whose software requires a network folder on the router smb server (USB drive)

I did it all manually and it works great

search every 6 min and automount TDDOWNLOAD nfs share

/jffs/scripts/init-start
Code:
#!/bin/sh
cru a NFS_MOUNT "*/6 * * * * /jffs/scripts/nfs.mount"

/jffs/scripts/nfs.mount
Code:
#!/bin/sh
if [ -n "$(showmount -e 192.168.1.14 | grep 'TDDOWNLOAD')" ] ; then
   if [ -z "$(mount | grep 'TDDOWNLOAD')" ] ; then
      mkdir /tmp/mnt/TDDOWNLOAD
      modprobe nfs
      mount -t nfs 192.168.1.14:/export/TDDOWNLOAD /tmp/mnt/TDDOWNLOAD
      if [ -z "$(grep -w '\[TDDOWNLOAD\]' /etc/smb.conf)" ] ; then
         echo "[TDDOWNLOAD]" >> /etc/smb.conf
         echo "comment = NFS's TDDOWNLOAD" >> /etc/smb.conf
         echo "veto files = /.__*.txt*/asusware*/asus_lighttpdpasswd/" >> /etc/smb.conf
         echo "path = /tmp/mnt/TDDOWNLOAD" >> /etc/smb.conf
         echo "writeable = yes" >> /etc/smb.conf
         echo "dos filetimes = yes" >> /etc/smb.conf
         echo "fake directory create times = yes" >> /etc/smb.conf
      fi
   else
      if [ -z "$(grep -w '\[TDDOWNLOAD\]' /etc/smb.conf)" ] ; then
         echo "[TDDOWNLOAD]" >> /etc/smb.conf
         echo "comment = NFS's TDDOWNLOAD" >> /etc/smb.conf
         echo "veto files = /.__*.txt*/asusware*/asus_lighttpdpasswd/" >> /etc/smb.conf
         echo "path = /tmp/mnt/TDDOWNLOAD" >> /etc/smb.conf
         echo "writeable = yes" >> /etc/smb.conf
         echo "dos filetimes = yes" >> /etc/smb.conf
         echo "fake directory create times = yes" >> /etc/smb.conf
      fi
   fi
fi
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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