For quite some time I’ve been trying to set up NFS an my MyBook World Edition (white light) to be able to mount the shared directories directly from Ubuntu.
Here is what I did:
- Enable NFS from the web front-end.
- On MBWE, adjust
- On Ubuntu, adjust /etc/fstab (my MBWE’s hostname is mybook):
- On MBWE type:
mybook:/nfs/Public /media/mybook nfs rw,user,nosuid,nodev 0 0
This seemed to have worked for a while but I noticed a few things:
- After every reboot, the statement in
/etc/exportswas back to
rw(which meant that the directory could only be mounted read-only).
- When trying to mount the directory, I got the following error message (this didn’t seem to have occurred at the beginning of my tests?):
mount.nfs: requested NFS version or transport protocol is not supported
As I couldn’t figure out how to tell MBWE not to overwrite
/etc/exports during reboot, I added a start-up command to overwrite it with my version of the file. To do this, I added a file called
/etc/init.d/ which contains the following lines:
cp /etc/exports.working /etc/exports
/etc/exports.working contains my changes (see above).
The second issue is due to the way the portmapper is set up. By default,
/etc/hosts.deny contains the following line:
This means that no RPC programs can be seen from the client (try rpcinfo -p mybook from Ubuntu). I added the following line to
Note: My MBWE and the Ubuntu client both have an IP in the range 192.168.1.1-255.
I then had to restart nfsd. Btw, the file
/etc/hosts.allow doesn’t seem to be overwritten during the boot process.
PS I might have left out some important setup steps above as I’m writing these notes from memory.