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
44 However, a system administrator can choose to add or delete
45 exports without modifying
54 and its partner program
56 work in one of two modes: a legacy mode which applies to 2.4 and
57 earlier versions of the Linux kernel, and a new mode which applies to
58 2.6 and later versions, providing the
60 virtual filesystem has been mounted at
64 On 2.6 kernels, if this filesystem is not mounted, the legacy mode is used.
68 does not give any information to the kernel, but provides it only to
74 then manages kernel requests for information about exports, as needed.
77 exports which identify a specific host, rather than a subnet or netgroup,
78 are entered directly into the kernel's export table,
79 as well as being written to
80 .IR /var/lib/nfs/etab .
81 Further, exports listed in
83 which match a non host-specific export request will cause an
84 appropriate export entry for the host given in
86 to be added to the kernel's export table.
90 Export or unexport all directories.
93 Specify a list of export options in the same manner as in
101 directory. Only default options and options given on the command line are used.
104 Reexport all directories, synchronizing
110 This option removes entries in
112 which have been deleted from
116 and removes any entries from the
117 kernel export table which are no longer valid.
120 Unexport one or more directories.
127 is mounted, flush everything out of the kernel's export table.
128 Fresh entries for active clients are added to the kernel's export table by
130 when they make their next NFS mount request.
133 Be verbose. When exporting or unexporting, show what's going on. When
134 displaying the current export list, also display the list of export
137 .SS Exporting Directories
138 The first synopsis shows how to invoke
140 when adding new entries to the export table. When using
142 all exports listed in
147 .IR /var/lib/nfs/etab .
148 The kernel's export table is also updated as needed.
152 argument specifies a local directory to export,
153 along with the client or clients who are permitted to access it.
156 for a description of supported options and access list formats.
157 To export a directory to the world, simply specify
160 The export options for a particular host/directory pair derive from
162 The default export options are
163 .BR sync,ro,root_squash,wdelay .
164 These can be overridden by entries in
169 A system administrator may override options from these sources using the
171 command-line option on
173 This option takes a comma-separated list of options in the same fashion
174 as one would specify them in
178 can be used to modify the export options of an already exported directory.
179 .SS Unexporting Directories
180 The third synopsis shows how to unexported a currently exported directory.
183 all entries listed in
185 are removed from the kernel export tables, and the file is cleared. This
186 effectively shuts down all NFS activity.
188 To remove an export, specify a
190 pair. This deletes the specified entry from
192 and removes the corresponding kernel entry (if any).
194 .SS Dumping the Export Table
197 without options shows the current list of exported file systems.
202 to display the export options for each export.
204 The following adds all directories listed in
210 and pushes the resulting export entries into the kernel:
220 allowing insecure file locking requests from clients:
223 .B "# exportfs -o insecure_locks django:/usr/tmp
231 .B "# exportfs -u django:/usr/tmp
234 To unexport all exports listed in
243 Exporting to IP networks or DNS and NIS domains does not enable clients
244 from these groups to access NFS immediately.
245 Rather, these sorts of exports are hints to
247 to grant any mount requests from these clients.
248 This is usually not a problem, because any existing mounts are preserved in
252 When unexporting a network or domain entry, any current exports to members
253 of this group will be checked against the remaining valid exports and
254 if they themselves are no longer valid they will be removed.
258 input file listing exports, export options, and access control lists
261 directory where extra input files are stored.
263 only files that end with
268 master table of exports
270 .I /var/lib/nfs/rmtab
271 table of clients accessing server's exports
277 Olaf Kirch <okir@monad.swb.de>
279 Neil Brown <neilb@cse.unsw.edu.au>