4. Exporting NFS Filesystems

Contents of this section

The file that controls what filesystems you wish to export is ``/etc/exports''. Its format is:

directory       hostname(options)

the ``(options)'' are optional. For example:

/mnt/export     speedy.redhat.com

would allow speedy.redhat.com to mount /mnt/export, but:

/mnt/export     speedy.redhat.com(ro)

would only allow speedy to mount /mnt/export read-only.

Each time you change /etc/exports, you need to tell the NFS daemons to examine it for new information. One simple way to accomplish this is to just stop and start the daemons:

/etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/nfs start

The following will also work:

killall -HUP rpc.nfsd rpc.mountd

The best way to see what is actually exported, is the showmount command (showmount(8)). To see what filesystems are currently exported on your current machine, you would type showmount -e. To see what filesystems are exported on a remote machine (like fred.foo.com), you would do showmount -e fred.foo.com.


Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter