~ubuntu-branches/ubuntu/precise/nfs-utils/precise-proposed

« back to all changes in this revision

Viewing changes to utils/exportfs/exportfs.man

  • Committer: Bazaar Package Importer
  • Author(s): Nathaniel McCallum
  • Date: 2004-09-10 13:10:39 UTC
  • Revision ID: james.westby@ubuntu.com-20040910131039-qxfjx4pwgoz6imbv
Tags: upstream-1.0.6
ImportĀ upstreamĀ versionĀ 1.0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"
 
2
.\" exportfs(8)
 
3
.\" 
 
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"
 
7
.SH NAME
 
8
exportfs \- maintain list of NFS exported file systems
 
9
.SH SYNOPSIS
 
10
.BI "/usr/sbin/exportfs [-avi] [-o " "options,.." "] [" "client:/path" " ..]
 
11
.br
 
12
.BI "/usr/sbin/exportfs -r [-v]"
 
13
.br
 
14
.BI "/usr/sbin/exportfs [-av] -u [" "client:/path" " ..]
 
15
.br
 
16
.BI "/usr/sbin/exportfs [-v]
 
17
.br
 
18
.BI "/usr/sbin/exportfs -f"
 
19
.br
 
20
.SH DESCRIPTION
 
21
The
 
22
.B exportfs
 
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
 
25
.BR /var/lib/nfs/xtab
 
26
which is read by
 
27
.B mountd
 
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.
 
30
.P
 
31
Normally this 
 
32
.B xtab
 
33
file is initialized with the list of all file systems named in
 
34
.B /etc/exports 
 
35
by invoking
 
36
.BR "exportfs -a" .
 
37
.P
 
38
However, administrators can choose to add and delete individual file systems
 
39
without modifying
 
40
.B /etc/exports
 
41
using
 
42
.BR exportfs .
 
43
.P
 
44
.B exportfs
 
45
and it's partner program
 
46
.B mountd
 
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
 
50
.B nfsd
 
51
virtual filesystem has been mounted at
 
52
.B /proc/fs/nfsd
 
53
or
 
54
.BR /proc/fs/nfs .
 
55
If this filesystem is not mounted in 2.6, the legacy mode is used.
 
56
.P
 
57
In the new mode,
 
58
.B exportfs
 
59
does not give any information to the kernel but only provides it to
 
60
.B mountd
 
61
through the
 
62
.B /var/lib/nfs/xtab
 
63
file.
 
64
.B mountd
 
65
will listen to requests from the kernel and will provide information
 
66
as needed.
 
67
.P
 
68
In the legacy mode,
 
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/xtab .
 
73
Further, any mount points listed in
 
74
.B /var/lib/nfs/rmtab
 
75
which match a non host-specific export request will cause an
 
76
appropriate export entry for the host given in
 
77
.B rmtab
 
78
to be entered
 
79
into the kernel's export table.
 
80
.SH OPTIONS
 
81
.TP 
 
82
.B -a
 
83
Export or unexport all directories.
 
84
.TP
 
85
.BI "-o " options,...
 
86
Specify a list of export options in the same manner as in
 
87
.BR exports(5) .
 
88
.TP
 
89
.B -i
 
90
Ignore the
 
91
.B /etc/exports
 
92
file, so that only default options and options given on the command
 
93
line are used.
 
94
.TP
 
95
.B -r
 
96
Reexport all directories. It synchronizes /var/lib/nfs/xtab
 
97
with /etc/exports. It removes entries in /var/lib/nfs/xtab
 
98
which are deleted from /etc/exports, and remove any entries from the
 
99
kernel export table which are no longer valid.
 
100
.TP
 
101
.B -u
 
102
Unexport one or more directories.
 
103
.TP
 
104
.B -f
 
105
In 'new' mode, flush everything out of the kernels export table. Any
 
106
clients that are active will get new entries added by
 
107
.B mountd
 
108
when they make their next request.
 
109
.TP
 
110
.B -v
 
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
 
113
options.
 
114
.SH DISCUSSION
 
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 
 
119
.BR "exportfs -a" ,
 
120
all directories in
 
121
.B exports(5)
 
122
are added to
 
123
.B xtab
 
124
and the resulting list is pushed into the kernel.
 
125
.P
 
126
The
 
127
.I host:/path
 
128
argument specifies the directory to export along with the host or hosts to
 
129
export it to. All formats described in
 
130
.B exports(5)
 
131
are supported; to export a directory to the world, simply specify
 
132
.IR :/path .
 
133
.P
 
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
 
136
entries in
 
137
.B /etc/exports
 
138
(unless the
 
139
.B -i
 
140
option is given).
 
141
In addition, the administrator may overide any options from these sources
 
142
using the
 
143
.B -o
 
144
argument which takes a comma-separated list of options in the same fashion
 
145
as one would specify them in
 
146
.BR exports(5) .
 
147
Thus,
 
148
.B exportfs
 
149
can also be used to modify the export options of an already exported
 
150
directory.
 
151
.P
 
152
Modifications of the kernel export table used by
 
153
.B nfsd(8)
 
154
take place immediately after parsing the command line and updating the
 
155
.B xtab
 
156
file.
 
157
.P
 
158
The default export options are
 
159
.BR sync,ro,root_squash,no_delay .
 
160
.\" -------------------- Unexporting Directories ------------------
 
161
.SS Unexporting Directories
 
162
The third synopsis shows how to unexported a currently exported directory.
 
163
When using
 
164
.BR "exportfs -ua" ,
 
165
all entries listed in
 
166
.B xtab
 
167
are removed from the kernel export tables, and the file is cleared. This
 
168
effectively shuts down all NFS activity.
 
169
.P
 
170
To remove individial export entries, one can specify a
 
171
.I host:/path
 
172
pair. This deletes the specified entry from
 
173
.B xtab
 
174
and removes the corresponding kernel entry (if any).
 
175
.P
 
176
.\" -------------------- Dumping the Export Table -----------------
 
177
.SS Dumping the Export Table 
 
178
Invoking
 
179
.B exportfs
 
180
without further options shows the current list of exported file systems.
 
181
When giving the
 
182
.B -v
 
183
option, the list of flags pertaining to each export are shown in addition.
 
184
.\" -------------------- EXAMPLES ---------------------------------
 
185
.SH EXAMPLES
 
186
The following adds all directories listed in
 
187
.B /etc/exports to /var/lib/nfs/xtab
 
188
and pushes the resulting export entries into the kernel:
 
189
.P
 
190
.nf
 
191
.B "# exportfs -a
 
192
.fi
 
193
.P
 
194
To export the
 
195
.B /usr/tmp
 
196
directory to host 
 
197
.BR djando ,
 
198
allowing asynchronous writes, one would do this:
 
199
.P
 
200
.nf
 
201
.B "# exportfs -o async django:/usr/tmp
 
202
.fi
 
203
.\" -------------------- DEPENDENCIES -----------------------------
 
204
.SH DEPENDENCIES
 
205
Exporting to IP networks, DNS and NIS domains does not enable clients
 
206
from these groups to access NFS immediately; rather, these sorts of
 
207
exports are hints to
 
208
.B mountd(8)
 
209
to grant any mount requests from these clients.
 
210
This is usually not a big problem, because any existing mounts are preserved
 
211
in
 
212
.B rmtab
 
213
across reboots.
 
214
.P
 
215
When unexporting a network or domain entry, any current exports to members
 
216
of this group will be checked against the remaining valid exports and
 
217
if they themselves are nolonger valid they will be removed.
 
218
.P
 
219
.\" -------------------- SEE ALSO --------------------------------
 
220
.SH SEE ALSO
 
221
.BR exports(5) ", " mountd(8)
 
222
.\" -------------------- AUTHOR ----------------------------------
 
223
.SH AUTHORS
 
224
Olaf Kirch, <okir@monad.swb.de>
 
225
.br
 
226
Neil Brown, <neilb@cse.unsw.edu.au>
 
227