MAN page from RedHat Other linux-nfs-0.4.22-1.i386.rpm
exportfs
Section: Maintenance Commands (8)
Updated: 15 Feb 1996
Index NAME
exportfs - maintain list of NFS exported file systems
SYNOPSIS
/usr/sbin/exportfs [-av] [-o options,..] [client:/path ..]/usr/sbin/exportfs [-av] -u [client:/path ..]/usr/sbin/exportfs [-v] DESCRIPTION
The
exportfscommand is used to maintain the current table of exported file systems forNFS. This list is kept in a separate file named
/var/lib/nfs/xtab.Normally, this file is initialized with the list of all file systems named in
/etc/exports by invoking
exportfs -a,and modified by
mountd(8)whenever receiving a mount request from a host that is matched by a networkor domain export.
However, administrators can choose to add and delete individual file systemswithout modifying/etc/exportsusingexportfs.
OPTIONS
- -a
- Export or unexport all directories.
- -o options,...
- Specify a list of export options in the same manner as inexports(5).
- -u
- Unexport one or more directories.
- -v
- Be verbose. When exporting or unexporting, show what's going on. Whendisplaying the current export list, also display the list of exportoptions.
DISCUSSION
Exporting Directories
The first synopsis shows how to invoke the command when adding newentries to the export table. When using
exportfs -a,all directories in
exports(5)are added to
xtaband the resulting list is pushed into the kernel.
Thehost:/pathargument specifies the directory to export along with the host or hosts toexport it to. All formats described inexports(5)are supported; to export a directory to the world, simply specify/path.
The export options for a particular host/directory pair derive fromseveral sources. The set of default options can be overridden byentries in/usr/etc/exports and /var/lib/nfs/xtab,if they exists.In addition, the administrator may overide any options from these sourcesusing the-oargument which takes a comma-separated list of options in the same fashionas one would specify them inexports(5).Thus,exportfscan also be used to modify the export options of an already exporteddirectory.
Modifications of the kernel export table used bynfsd(8)take place immediately after parsing the command line and updating thextabfile.
Unexporting Directories
The second synopsis shows how to unexported a currently exported directory.When using
exportfs -ua,all entries listed in
xtabare removed from the kernel export tables, and the file is cleared. Thiseffectively shuts down all NFS activity.
To remove individial export entries, one can specify ahost:/pathpair. This deletes the specified entry fromxtaband removes the corresponding kernel entry.
Dumping the Export Table
Invoking
exportfswithout further options shows the current list of exported file systems.When giving the
-voption, the list of flags pertaining to each export are shown in addition.
EXAMPLES
The following adds all directories listed in
/etc/exports to /var/lib/nfs/xtaband pushes the resulting export entries into the kernel:
# exportfs -a
To export the/usr/tmpdirectory to host djando,allowing asynchronous writes, one would do this:
# exportfs django:/usr/tmp -o async
If the directory was already exported,
DEPENDENCIES
Exporting to IP networks, DNS and NIS domains does not enable clientsfrom these groups to access NFS immediately; rather, these sorts ofexports are hints to
mountd(8)to grant any mount requests from these clients.This is usually not a big problem, because any existing mounts are preservedin
xtabacross reboots.
When unexporting a network or domain entry, any current exports to membersof this group are unaffected. The reason for this is that exportfscannot tell whether these specific exports were created as a result of thegroup export, or whether they have been exported independently.
SEE ALSO
exports(5),
mountd(8) AUTHOR
Olaf Kirch, <okirAATTmonad.swb.de>
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- DISCUSSION
- Exporting Directories
- Unexporting Directories
- Dumping the Export Table
- EXAMPLES
- DEPENDENCIES
- SEE ALSO
- AUTHOR
This document was created byman2html,using the manual pages.