How to mount NFS client to NFS server?

Discussion in 'Tomato Firmware' started by leandroong, Nov 14, 2013.

  1. leandroong

    leandroong LI Guru Member

    Tomato Firmware 1.28.0000 MIPSR1-114 K26 USB AIO

    Experimenting, trying to mount my tomato router to main router (Rt-n15u) usb harddisk. My problem is setting NFS client. This is what I did?
    1. mkdir /mnt/nfs
    2. mount -t nfs /mnt/nfs
    mount.nfs: rpc.statd is not running but is required for remote locking.
    Either use '-o nolock' to keep locks local, or start statd.

    How should I do it?
    Note: main router, content of /etc/exports
    Last edited: Nov 14, 2013
  2. leandroong

    leandroong LI Guru Member

    Got it. Correct syntax:
    mount -t nfs -o nolock /mnt/nfs

    root@BTRouter2:/tmp/home/root# ls /mnt/nfs
    downloads lost+found opt
  3. leandroong

    leandroong LI Guru Member

    Automating mounting problem:
    1. edit /etc/fstab, add the ff: /mnt nfs rw 0 0
    2. reboot router

    Problem: ls /mnt, does not create nfs folder. Any idea, how to do it correctly?
  4. leandroong

    leandroong LI Guru Member

    Workaround solution.
    1. edit init script, add the ff:
    modprobe bcm_nat
    mkdir /mnt/nfs
    mount -t nfs -o nolock /mnt/nfs
    2. to test, ls /mnt/nfs, result is success.
  5. Almaz

    Almaz Networkin' Nut Member

    Just curious, why would NFS require modprobe bcm_nat?
  6. leandroong

    leandroong LI Guru Member

    You dont need that.
  7. koitsu

    koitsu Network Guru Member

    Also, use of -o nolock on Linux means lack of exclusive NLM locking. This is fine if the only NFS client on your entire network is your router, but in no other circumstance is this advised. (All it takes is two separate NFS clients writing to the same file at the same time, with use of -o nolock, to have the contents of the file clobbered, truncated, or interspersed).

    Otherwise if you don't want to risk it, someone needs to include lockd and rpcbind (a.k.a portmapper) binaries (daemons) appropriately.

  8. leandroong

    leandroong LI Guru Member

    I test downloading using transmission and got halted 25% completion. Any idea?
  9. leandroong

    leandroong LI Guru Member

    Got same prolem on repeat transmission download, 63% completion. I notice that it killed transmission-daemon.
  10. leandroong

    leandroong LI Guru Member

    Seems to work only for small torrent file, below 50MB ...
  11. leandroong

    leandroong LI Guru Member

    Solution, decrease rsize and wsize values. Now transmission working without errors...

    Current values:
    root@BTRouter2:/tmp/home/root# cat /proc/mounts
    ... /tmp/mnt/downloads nfs rw,vers=3,rsize=65536,wsize=65536,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,addr=10.0.1. 0 0

    change mounting to:
    root@BTRouter2:/tmp/home/root# mount -t nfs -o nolock,rsize=32768,wsize=32768 /mnt/downloads
  12. leandroong

    leandroong LI Guru Member

    to unmount nfs client, issue "umount /mnt/downloads"
  13. leandroong

    leandroong LI Guru Member

    Here is the perfect mounting NFS client that works well with transmission:

    mount -t nfs -o nolock,intr,hard,timeo=14,sync /mnt/downloads

    note: sync is very important, it waits for NFS server write completion
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice