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.
First of all you will need nfs startup script, I call it
/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 nfsd.sh 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
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 192.168.1.0/24 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.
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:
- Insmod sunrpc.ko, nfs_acl.ko, lockd.ko, nfs.ko
- Run portmap and rpc.mountd
- mount mybook_ip:/shares/internal /mnt -o rw