MyBook World Edition acting as a NFS server

I feel that MyBook Unix users are missing one feature like me: NFS server. It would be nice to be able to mount MyBook share using native Unix "sharing", nfs. Good news is that it's possible. Even better is that you don't have to compile anything, everything is already pre-installed on MyBook.

Startup script

First of all you will need nfs startup script, I call it /etc/init.d/

modprobe sunrpc
modprobe lockd
modprobe nfs_acl
modprobe exportfs
modprobe nfsd

sleep 2
sleep 2
/usr/sbin/rpc.mountd 2>/var/log/nfsdlog
/usr/sbin/rpc.nfsd 5 2>/var/log/nfsdlog
/usr/sbin/exportfs -ra 2>/var/log/nfsdlog
Don't forget to chmod 755 the script!

Running the script during boot process

The easiest way is to run the script from /etc/inittab, add the bold line:
# Mount the USB filesystem
::sysinit:/bin/mount -t usbfs usbfs /proc/bus/usb

# Run any rc scripts

# Set up a couple of getty's
#tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2

Preparing exports

NFS server requires to have share information in /etc/exports, I have the following line in this file:
This means that all hosts on network can mount this share in read-write mode in sync access mode and all accessess are done using uid 33 (www-data, used for windows sharing). For more information look at exports manual page.

Testing ....

Now reboot your MyBook using reboot command. Then you can try to mount the "/shares/internal" folder from your Unix box. On Linux, you have to: