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
55 If this filesystem is not mounted in 2.6, the legacy mode is used.
59 does not give any information to the kernel but only provides it to
65 will listen to requests from the kernel and will provide information
69 any export requests which identify a specific host (rather than a
70 subnet or netgroup etc) are entered directly into the kernel's export
71 table as well as being written to
72 .BR /var/lib/nfs/etab .
73 Further, any mount points listed in
75 which match a non host-specific export request will cause an
76 appropriate export entry for the host given in
79 into the kernel's export table.
83 Export or unexport all directories.
86 Specify a list of export options in the same manner as in
92 file, so that only default options and options given on the command
96 Reexport all directories. It synchronizes /var/lib/nfs/etab
97 with /etc/exports. It removes entries in /var/lib/nfs/etab
98 which are deleted from /etc/exports, and remove any entries from the
99 kernel export table which are no longer valid.
102 Unexport one or more directories.
105 In 'new' mode, flush everything out of the kernels export table. Any
106 clients that are active will get new entries added by
108 when they make their next request.
111 Be verbose. When exporting or unexporting, show what's going on. When
112 displaying the current export list, also display the list of export
115 .\" -------------------- Exporting Directories --------------------
116 .SS Exporting Directories
117 The first synopsis shows how to invoke the command when adding new
118 entries to the export table. When using
124 and the resulting list is pushed into the kernel.
128 argument specifies the directory to export along with the host or hosts to
129 export it to. All formats described in
131 are supported; to export a directory to the world, simply specify
134 The export options for a particular host/directory pair derive from
135 several sources. There is a set of default options which can be overridden by
141 In addition, the administrator may override any options from these sources
144 argument which takes a comma-separated list of options in the same fashion
145 as one would specify them in
149 can also be used to modify the export options of an already exported
152 Modifications of the kernel export table used by
154 take place immediately after parsing the command line and updating the
158 The default export options are
159 .BR sync,ro,root_squash,wdelay .
160 .\" -------------------- Unexporting Directories ------------------
161 .SS Unexporting Directories
162 The third synopsis shows how to unexported a currently exported directory.
165 all entries listed in
167 are removed from the kernel export tables, and the file is cleared. This
168 effectively shuts down all NFS activity.
170 To remove an export to a host, specify a
172 pair. This deletes the specified entry from
174 and removes the corresponding kernel entry (if any).
175 To remove one or more exports to several hosts, use
178 .\" -------------------- Dumping the Export Table -----------------
179 .SS Dumping the Export Table
182 without further options shows the current list of exported file systems.
185 option, the list of flags pertaining to each export are shown in addition.
186 .\" -------------------- EXAMPLES ---------------------------------
188 The following adds all directories listed in
192 and pushes the resulting export entries into the kernel:
202 allowing asynchronous writes, one would do this:
205 .B "# exportfs -o async django:/usr/tmp
213 .B "# exportfs -u django:/usr/tmp
216 To unexport all the directories listed in
222 .\" -------------------- DEPENDENCIES -----------------------------
224 Exporting to IP networks, DNS and NIS domains does not enable clients
225 from these groups to access NFS immediately; rather, these sorts of
228 to grant any mount requests from these clients.
229 This is usually not a big problem, because any existing mounts are preserved
234 When unexporting a network or domain entry, any current exports to members
235 of this group will be checked against the remaining valid exports and
236 if they themselves are no longer valid they will be removed.
238 .\" -------------------- SEE ALSO --------------------------------
240 .BR exports(5) ", " mountd(8)
241 .\" -------------------- AUTHOR ----------------------------------
243 Olaf Kirch, <okir@monad.swb.de>
245 Neil Brown, <neilb@cse.unsw.edu.au>