First run the following commands on the freebsd system:
sudo portmap sudo nfsd -u -t -n 1 sudo mountd -r
Note that on systems newer than freebsd version 4, portmap should be replaced with rpcbind.
The /etc/exports looks like this:
# note that mountd must be reloaded if this file is edited. # use kill -HUP `cat /var/run/mountd.pid` /home/clacy/dev -maproot=root laptop-hostname.london.corp.yahoo.com # (yes I work for yahoo!)
on the remote system (client) first I installed the nfs-common package and then check the available exports like this:
chris@laptop-hostname:~/dev$ sudo apt-get install nfs-common chris@laptop-hostname:~/dev$ showmount -e servername.london.corp.yahoo.com Export list for servername.london.corp.yahoo.com: /home/clacy/dev laptop-hostname.london.corp.yahoo.com
so now I can just mount the 'dev' node into my local tree like this:
sudo mount servername.london.corp.yahoo.com:/home/clacy/dev /home/chris/dev
That's it. Using NFS in this way allows me to mount parts of a remove filesystem into my local machine. This is useful in my work situation where I run a headless freebsd dev box onto which cvs is checked out - I can now mount that remote tree into my local tree and then edit any of those files with all the goodness of GNOME and the editor-fu of gedit or eclipse. NFS does come with potential security issues, however, so be sure to manage your hosts files with care.
So that's all.. NFS in 30 seconds