NFS HOWTO : Setting up a NFS client
Previous: Mountd and nfsd
Next: Mount options

4. Setting up a NFS client

First you will need a kernel with the NFS file system either compiled in or available as a module. This is configured in the GENERIC FreeBSD kernel for you.

You can now, at a root prompt, enter a appropriate mount command and the file system will appear. Continuing the example in the previous section we want to mount /mn/eris/local from eris. This is done with this command:


mount -o rsize=1024,wsize=1024 eris:/mn/eris/local /mnt

(We'll get back to the rsize and wsize options.) The file system is now available under /mnt and you can cd there, and ls in it, and look at the individual files. You will notice that it's not as fast as a local file system, but a lot more convenient than ftp. If, instead of mounting the file system, mount produces a error message like mount: eris:/mn/eris/local failed, reason given by server: Permission denied then the exports file is wrong, or you forgot to run exportfs after editing the exports file. If it says mount clntudp_create: RPC: Program not registered it means that nfsd or mountd is not running on the server.

To get rid of the file system you can say


umount /mnt

To make the system mount a nfs file system upon boot you edit /etc/fstab in the normal manner. For our example a line such as this is required:


# Device      Mountpoint     FStype      Options	      Dump Pass#    
...
eris:/mn/eris/local  /mnt    nfs	rsize=1024,wsize=1024 0	   0
...

That's all there is too it, almost. Read on please.

4.1. Mount options

4.2. Optimizing NFS


NFS HOWTO : Setting up a NFS client
Previous: Mountd and nfsd
Next: Mount options