DD-WRT:NFS (unfsd) on Optware

cmcgrath5035

Following several forum items and suggestions from Frater, I successfully implemented an NFS service on my RT-16N router. I am running DD-WRT v24-sp2 (12/24/10) big - build 15962 and Optware Done the Right Way. I have an attached USB HDD for /opt and a big share that installs on /mnt.

1. Install portmap with ipkg-opt install portmap

2. Install unfs3 with ipkg-opt install unfs3

Both download the executable and a setup script installed in /opt/etc/init.d

unfs3 needs the libs in /opt/lib to run.

Frater recommends we avoid a global change to LD_LIBRARY_PATH, so I changed the startup file as follows

/opt/etc/init.d# cat S56unfsd
 * 1) !/bin/sh

if [ -n "`pidof unfsd`" ] ; then killall unfsd 2>/dev/null fi

sleep 2


 * 1) cjm /opt/sbin/unfsd

LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH} /opt/sbin/unfsd -e /opt/etc/exports
 * 1) cjm Make sure uClib is used and specify path for 'exports' file
 * 1) cjm

3. create an exports file, such as root@DD-WRT-Cape-RT16N:/opt/etc# cat exports
 * 1) /etc/exports: the access control list for filesystems which may be exported
 * 2)      to NFS clients.  See exports(5).
 * 3) cjm sets up exports 1 January 2011
 * 1) cjm sets up exports 1 January 2011

/mnt/Share-Export      192.168.10.0/255.255.255.0(rw,sync,no_subtree_check,no_root_squash)

4. reboot or manually start portmap and unfsd sh /opt/etc/init.d/S55portmap sh /opt/etc/init.d/S56unfsd 5. check to see they are running with ps -A

6. From another *nix on your LAN,execute showmount -e 192.168.10.1 results--> Export list for 192.168.10.1: /mnt/Share-Export 192.168.10.0/255.255.255.0

Since many seem to ask, I ran a quick comparison of file copy from My SuSE machine to this shared folder, which is accessable both with Samba3 and unfsd. The network is a GigE(wired). I copies a 1GB file from SuSE to DD-WRT/Optware

Samba3 - 4.7 MB/s avg unfsd - 6.1Mb/s avg

The combination of the RT-16N/DD-WRT/OptwareDoneRight is awesome