Next, compile and install your new kernel and reboot. Your system will
now have NFS 3 server and client support built-in.
Now that our NFS server has support for NFS in the kernel, it's time to
set up an /etc/exports file. The /etc/exports file will describe the
local filesystems that will be made available for export, as well as which
hosts will be able to access these filesystems, and whether they will be
exported as read/write or read-only. It will also allow us to specify
other options that control NFS behavior.
But before we look at the format of the /etc/exports file, a big fat
implementation warning is in order! The NFS implementation in the Linux
kernel only allows the export of one local directory per filesystem. This
means that if both /usr and /home are on the same ext3 filesystem (using
/dev/hda6, for example), then you can't have both /usr and /home export
lines in /etc/exports. If you try to add these lines, you'll see errors
like this when your /etc/exports file gets reread (which will happen if
you type exportfs -ra after your NFS server is up and
running):
sidekick:/home: Invalid argument