Terastation NFS

(moved here from Hacking)

N.B. There is also a lot of potentially useful information in the discussion page corresponding to this article, which needs refactoring and moving here.

= Kernel-mode vs. user-mode =

There are two choices for NFS support: kernel-mode and user-mode. Kernel-mode has better performance than user-mode, but user-mode is potentially more stable, in that if something goes badly wrong, the damage is limited to the userspace daemons. If something goes wrong via the nfsd kernel module, the machine could easily hang.

However, see also this post by Olaf Kirch which points out a number of serious deficiencies with the user-mode approach.

= Kernel-Mode NFS =

OK, this link contains the kernel modules, the utilities and the startup files for kernel NFS. It's built against the 2.4.20_mvl31-ppc_linkstation kernel, so won't work on a standard Terastation.

I believe the correct stuff for Terastation is here --Neilfred 04:46, 14 January 2007 (CET)

I have just completed trying Neilfreds kernel modules on my 2.4.20_mvl31-ppc_terastation. I received the following error when issuing

depmod -a depmod: *** Unresolved symbols in /lib/modules/2.4.20_mvl31-ppc_terastation/kernel/net/sunrpc/sunrpc.o

As well as errors when trying to start the NFS daemon
 * 1) /etc/init.d/nfs-common

start/lib/modules/2.4.20_mvl31-ppc_terastation/kernel/net/sunrpc/sunrpc.o: kernel-module version mismatch /lib/modules/2.4.20_mvl31-ppc_terastation/kernel/net/sunrpc/sunrpc.o was compiled for kernel version 2.4.20_mvl31-ppc_linkstation while this kernel is version 2.4.20_mvl31-ppc_terastation.

Very important step post-installation! During tar extraction, the /var -> /mnt/ram/var symlink will probably get overwritten, so you need to restore it:

cp -a /var/lib /mnt/ram/var/lib mv /var /var.old ln -s /mnt/ram/var /var

Edit /etc/exports to match your setup, then reboot or run the init files by hand:

depmod -a /etc/init.d/portmap start /etc/init.d/nfs-common start /etc/init.d/nfs-kernel-server start

Warning
Problems with NFS may arise, please see the discussion page for details.

Having just spent several days trying to get NFS working I can give a few tips. If you can write to the NFS share, but have problems reading from it (transfers stall or terastation randomly reboots) try disabling jumbo packets. If the jumbo packet size on all your machines doesn't match than UDP transfers such as NFS wreak havoc with the terastation. I now have the 2.03 firmware and user mode NFS (from debian PPC) working smoothly. An alternative solution would be to use TCP rather than UDP for NFS, but not all NFS implementations support this.