4 .\" Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
5 .\" Modifications 1999-2003 Neil Brown <neilb@cse.unsw.edu.au>
6 .TH exportfs 8 "18 July 2003"
8 exportfs \- maintain list of NFS exported file systems
10 .BI "/usr/sbin/exportfs [-avi] [-o " "options,.." "] [" "client:/path" " ..]
12 .BI "/usr/sbin/exportfs -r [-v]"
14 .BI "/usr/sbin/exportfs [-av] -u [" "client:/path" " ..]
16 .BI "/usr/sbin/exportfs [-v]
18 .BI "/usr/sbin/exportfs -f"
23 command is used to maintain the current table of exported file systems for
24 NFS. This list is kept in a separate file named
28 when a remote host requests access to mount a file tree, and parts of
29 the list which are active are kept in the kernel's export table.
33 file is initialized with the list of all file systems named in
38 However, administrators can choose to add and delete individual file systems
45 and it's partner program
47 work in one of two modes, a legacy mode which applies to 2.4 and
48 earlier versions of the Linux kernel, and a new mode which applies to
49 2.6 and later versions providing the
51 virtual filesystem has been mounted at
53 If this filesystem is not mounted in 2.6, the legacy mode is used.
57 does not give any information to the kernel but only provides it to
63 will listen to requests from the kernel and will provide information
67 any export requests which identify a specific host (rather than a
68 subnet or netgroup etc) are entered directly into the kernel's export
69 table as well as being written to
70 .BR /var/lib/nfs/xtab .
71 Further, any mount points listed in
73 which match a non host-specific export request will cause an
74 appropriate export entry for the host given in
77 into the kernel's export table.
81 Export or unexport all directories.
84 Specify a list of export options in the same manner as in
90 file, so that only default options and options given on the command
94 Reexport all directories. It synchronizes /var/lib/nfs/xtab
95 with /etc/exports. It removes entries in /var/lib/nfs/xtab
96 which are deleted from /etc/exports, and remove any entries from the
97 kernel export table which are no longer valid.
100 Unexport one or more directories.
103 In 'new' mode, flush everything out of the kernels export table. Any
104 clients that are active will get new entries added by
106 when they make their next request.
109 Be verbose. When exporting or unexporting, show what's going on. When
110 displaying the current export list, also display the list of export
113 .\" -------------------- Exporting Directories --------------------
114 .SS Exporting Directories
115 The first synopsis shows how to invoke the command when adding new
116 entries to the export table. When using
122 and the resulting list is pushed into the kernel.
126 argument specifies the directory to export along with the host or hosts to
127 export it to. All formats described in
129 are supported; to export a directory to the world, simply specify
132 The export options for a particular host/directory pair derive from
133 several sources. There is a set of default options which can be overridden by
139 In addition, the administrator may overide any options from these sources
142 argument which takes a comma-separated list of options in the same fashion
143 as one would specify them in
147 can also be used to modify the export options of an already exported
150 Modifications of the kernel export table used by
152 take place immediately after parsing the command line and updating the
156 The default export options are
157 .BR sync,ro,root_squash,no_delay .
158 .\" -------------------- Unexporting Directories ------------------
159 .SS Unexporting Directories
160 The third synopsis shows how to unexported a currently exported directory.
163 all entries listed in
165 are removed from the kernel export tables, and the file is cleared. This
166 effectively shuts down all NFS activity.
168 To remove individial export entries, one can specify a
170 pair. This deletes the specified entry from
172 and removes the corresponding kernel entry (if any).
174 .\" -------------------- Dumping the Export Table -----------------
175 .SS Dumping the Export Table
178 without further options shows the current list of exported file systems.
181 option, the list of flags pertaining to each export are shown in addition.
182 .\" -------------------- EXAMPLES ---------------------------------
184 The following adds all directories listed in
185 .B /etc/exports to /var/lib/nfs/xtab
186 and pushes the resulting export entries into the kernel:
196 allowing asynchronous writes, one would do this:
199 .B "# exportfs -o async django:/usr/tmp
201 .\" -------------------- DEPENDENCIES -----------------------------
203 Exporting to IP networks, DNS and NIS domains does not enable clients
204 from these groups to access NFS immediately; rather, these sorts of
207 to grant any mount requests from these clients.
208 This is usually not a big problem, because any existing mounts are preserved
213 When unexporting a network or domain entry, any current exports to members
214 of this group will be checked against the remaining valid exports and
215 if they themselves are nolonger valid they will be removed.
217 .\" -------------------- SEE ALSO --------------------------------
219 .BR exports(5) ", " mountd(8)
220 .\" -------------------- AUTHOR ----------------------------------
222 Olaf Kirch, <okir@monad.swb.de>
224 Neil Brown, <neilb@cse.unsw.edu.au>