3 .\" Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
4 .\" Modifications 1999-2003 Neil Brown <neilb@cse.unsw.edu.au>
6 .TH exportfs 8 "31 December 2009"
8 exportfs \- maintain table of exported NFS 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"
21 An NFS server maintains a table of local physical file systems
22 that are accessible to NFS clients.
23 Each file system in this table is referred to as an
24 .IR "exported file system" ,
31 command maintains the current table of exports for the NFS server.
32 The master export table is kept in a file named
33 .IR /var/lib/nfs/etab .
36 when a client sends an NFS MOUNT request.
38 Normally the master export table is initialized with the contents of
42 However, a system administrator can choose to add or delete
43 exports without modifying
50 and its partner program
52 work in one of two modes: a legacy mode which applies to 2.4 and
53 earlier versions of the Linux kernel, and a new mode which applies to
54 2.6 and later versions, providing the
56 virtual filesystem has been mounted at
60 On 2.6 kernels, if this filesystem is not mounted, the legacy mode is used.
64 does not give any information to the kernel, but provides it only to
70 then manages kernel requests for information about exports, as needed.
73 exports which identify a specific host, rather than a subnet or netgroup,
74 are entered directly into the kernel's export table,
75 as well as being written to
76 .IR /var/lib/nfs/etab .
77 Further, exports listed in
79 which match a non host-specific export request will cause an
80 appropriate export entry for the host given in
82 to be added to the kernel's export table.
86 Export or unexport all directories.
89 Specify a list of export options in the same manner as in
95 file. Only default options and options given on the command line are used.
98 Reexport all directories, synchronizing
102 This option removes entries in
104 which have been deleted from
105 .I /etc/exports, and removes any entries from the
106 kernel export table which are no longer valid.
109 Unexport one or more directories.
116 is mounted, flush everything out of the kernel's export table.
117 Fresh entries for active clients are added to the kernel's export table by
119 when they make their next NFS mount request.
122 Be verbose. When exporting or unexporting, show what's going on. When
123 displaying the current export list, also display the list of export
126 .SS Exporting Directories
127 The first synopsis shows how to invoke
129 when adding new entries to the export table. When using
131 all exports listed in
134 .IR /var/lib/nfs/etab .
135 The kernel's export table is also updated as needed.
139 argument specifies a local directory to export,
140 along with the client or clients who are permitted to access it.
143 for a description of supported options and access list formats.
144 To export a directory to the world, simply specify
147 The export options for a particular host/directory pair derive from
149 The default export options are
150 .BR sync,ro,root_squash,wdelay .
151 These can be overridden by entries in
154 A system administrator may override options from these sources using the
156 command-line option on
158 This option takes a comma-separated list of options in the same fashion
159 as one would specify them in
163 can be used to modify the export options of an already exported directory.
164 .SS Unexporting Directories
165 The third synopsis shows how to unexported a currently exported directory.
168 all entries listed in
170 are removed from the kernel export tables, and the file is cleared. This
171 effectively shuts down all NFS activity.
173 To remove an export, specify a
175 pair. This deletes the specified entry from
177 and removes the corresponding kernel entry (if any).
179 .SS Dumping the Export Table
182 without options shows the current list of exported file systems.
187 to display the export options for each export.
189 The following adds all directories listed in
193 and pushes the resulting export entries into the kernel:
203 allowing insecure file locking requests from clients:
206 .B "# exportfs -o insecure_locks django:/usr/tmp
214 .B "# exportfs -u django:/usr/tmp
217 To unexport all exports listed in
224 Exporting to IP networks or DNS and NIS domains does not enable clients
225 from these groups to access NFS immediately.
226 Rather, these sorts of exports are hints to
228 to grant any mount requests from these clients.
229 This is usually not a problem, because any existing mounts are preserved in
233 When unexporting a network or domain entry, any current exports to members
234 of this group will be checked against the remaining valid exports and
235 if they themselves are no longer valid they will be removed.
239 input file listing exports, export options, and access control lists
242 master table of exports
244 .I /var/lib/nfs/rmtab
245 table of clients accessing server's exports
251 Olaf Kirch <okir@monad.swb.de>
253 Neil Brown <neilb@cse.unsw.edu.au>