Linksys NSLU2 Network Storage Device



Thanks to the great work of Jim Buzbee at batbox.org the linux based Linksys nslu2 storage device is accessible and begging to be modified.  On his page you will find links to the arm toolchain and linksys provided source for the operating system and tools.

The nslu2 is horrible at keeping time.  Linksys (Cisco) is supposed to take care of this in an upcoming firmware release.  Even if the clock is made more accurate, a storage device needs to be synchronized with the workstations that use it.  After spending a considerable amount of time trying to get a full-blown ntpd installation working on the box, I decided to back off and found that ntpclient compiles and runs without changes.  Here are my binaries for ntpclient and adjtimex. 
You should follow the HOWTO on the ntpclient page. On my (and probably your) box, the tick is set to 9903 at boot. I found that the clock is too far off to adjust using just the frequency setting alone. I found that setting the tick (adjtimex -t) value to 10000 allows me to then collect data and get a frequency setting that is pretty good. I have run for about a week with what I consider good results. Technically, the clock on the nslu2 is not "locked" to my ntp server, but I found that over the course of a week I was usually within 200ms and never more than 350ms off my server. This may be dreadful performance for ntp (by at least an order of magnitude), but it does keep the clock within 1/3 of a second.

The following works for me:
# adjtimex -t 10000
# ntpclient -s -h ntpserver
# ntpclient -i 60 -l -h ntpserver > ntp.log &


I have used the openembedded (oe) nslu2-linksys target to generate nfs modules that can be used on a stock nslu2 with linksys firmware. Here are my binaries for the modules and utilities necessary to have kernel mode nfs with support for version 3 (and 2) and large file support. This should provide a substantial performance boost over the non kernel-mode nfs code. After unpacking the tar file, you should have an nfsv3 directory containing the modules and executables and a README file. You will need to create an /etc/exports file using the correct syntax and:
# mkdir -p /var/lib/nfs
# touch /var/lib/nfs/etab
# touch /var/lib/nfs/rmtab
# cd nfsv3
# insmod ./sunrpc.o
# insmod ./lockd.o
# insmod ./nfsd.o
# ./portmap
# ./mountd
# ./nfsd