4affa0e585ffefae0a43c466670a52ef78c18b22
[openafs.git] / doc / man-pages / pod8 / fileserver.pod
1 =head1 NAME
2
3 fileserver - Initializes the File Server component of the fs process
4
5 =head1 SYNOPSIS
6
7 B<fileserver> [B<-d> <I<debug level>>] [B<-p> <I<number of processes>>]
8     [B<-spare> <I<number of spare blocks>>]
9     [B<-pctspare> <I<percentage spare>>] [B<-b> <I<buffers>>]
10     [B<-l> <I<large vnodes>>] [B<-s> <I<small nodes>>]
11     [B<-vc> <I<volume cachesize>>] [B<-w> <I<call back wait interval>>]
12     [B<-cb> <I<number of call backs>>] [B<-banner>] [B<-novbc>]
13     [B<-implicit> <I<admin mode bits: rlidwka>>]
14     [B<-hr> <I<number of hours between refreshing the host cps>>]
15     [B<-busyat> <I<< redirect clients when queue > n >>>]
16     [B<-rxpck> <I<number of rx extra packets>>]
17     [B<-rxdbg>] [B<-rxdbge>] [B<-m> <I<min percentage spare in partition>>]
18     [B<-lock>] [B<-L>] [B<-S>] [B<-k> <I<stack size>>]
19     [B<-realm> <I<Kerberos realm name>>]
20     [B<-udpsize> <I<size of socket buffer in bytes>>]
21     [B<-enable_peer_stats>] [B<-enable_process_stats>] [B<-help>]
22
23 =head1 DESCRIPTION
24
25 The B<fileserver> command initializes the File Server component of the
26 C<fs> process. In the conventional configuration, its binary file is
27 located in the F</usr/afs/bin> directory on a file server machine.
28
29 The B<fileserver> command is not normally issued at the command shell
30 prompt, but rather placed into a database server machine's
31 F</usr/afs/local/BosConfig> file with the B<bos create> command. If it is
32 ever issued at the command shell prompt, the issuer must be logged onto a
33 file server machine as the local superuser C<root>.
34
35 The File Server creates the F</usr/afs/logs/FileLog> log file as it
36 initializes, if the file does not already exist. It does not write a
37 detailed trace by default, but use the B<-d> option to increase the amount
38 of detail. Use the B<bos getlog> command to display the contents of the
39 log file.
40
41 The command's arguments enable the administrator to control many aspects
42 of the File Server's performance, as detailed in L<OPTIONS>.  By default
43 the B<fileserver> command sets values for many arguments that are suitable
44 for a medium-sized file server machine. To set values suitable for a small
45 or large file server machine, use the B<-S> or B<-L> flag
46 respectively. The following list describes the parameters and
47 corresponding argument for which the B<fileserver> command sets default
48 values, and the table below summarizes the setting for each of the three
49 machine sizes.
50
51 =over 4
52
53 =item *
54
55 The maximum number of lightweight processes (LWPs) the File Server uses to
56 handle requests for data; corresponds to the B<-p> argument. The File
57 Server always uses a minimum of 32 KB for these processes.
58
59 =item *
60
61 The maximum number of directory blocks the File Server caches in memory;
62 corresponds to the B<-b> argument. Each cached directory block (buffer)
63 consumes 2,092 bytes of memory.
64
65 =item *
66
67 The maximum number of large vnodes the File Server caches in memory for
68 tracking directory elements; corresponds to the B<-l> argument. Each large
69 vnode consumes 292 bytes of memory.
70
71 =item *
72
73 The maximum number of small vnodes the File Server caches in memory for
74 tracking file elements; corresponds to the B<-s> argument.  Each small
75 vnode consumes 100 bytes of memory.
76
77 =item *
78
79 The maximum volume cache size, which determines how many volumes the File
80 Server can cache in memory before having to retrieve data from disk;
81 corresponds to the B<-vc> argument.
82
83 =item *
84
85 The maximum number of callback structures the File Server caches in
86 memory; corresponds to the B<-cb> argument. Each callback structure
87 consumes 16 bytes of memory.
88
89 =item *
90
91 The maximum number of Rx packets the File Server uses; corresponds to the
92 B<-rxpck> argument. Each packet consumes 1544 bytes of memory.
93
94 =back
95
96 The default values are:
97
98   Parameter (Argument)               Small (-S)     Medium   Large (-L)
99   ---------------------------------------------------------------------
100   Number of LWPs (-p)                        6           9           12
101   Number of cached dir blocks (-b)          70          90          120
102   Number of cached large vnodes (-l)       200         400          600
103   Number of cached small vnodes (-s)       200         400          600
104   Maximum volume cache size (-vc)          200         400          600
105   Number of callbacks (-cb)             20,000      60,000       64,000
106   Number of Rx packets (-rxpck)            100         150          200
107
108 To override any of the values, provide the indicated argument (which can
109 be combined with the B<-S> or B<-L> flag).
110
111 The amount of memory required for the File Server varies. The approximate
112 default memory usage is 751 KB when the B<-S> flag is used (small
113 configuration), 1.1 MB when all defaults are used (medium configuration),
114 and 1.4 MB when the B<-L> flag is used (large configuration). If
115 additional memory is available, increasing the value of the B<-cb> and
116 B<-vc> arguments can improve File Server performance most directly.
117
118 By default, the File Server allows a volume to exceed its quota by 1 MB
119 when an application is writing data to an existing file in a volume that
120 is full. The File Server still does not allow users to create new files in
121 a full volume. To change the default, use one of the following arguments:
122
123 =over 4
124
125 =item *
126
127 Set the B<-spare> argument to the number of extra kilobytes that the File
128 Server allows as overage. A value of C<0> allows no overage.
129
130 =item *
131
132 Set the B<-pctspare> argument to the percentage of the volume's quota the
133 File Server allows as overage.
134
135 =back
136
137 By default, the File Server implicitly grants the C<a> (administer) and
138 C<l> (lookup) permissions to system:administrators on the access control
139 list (ACL) of every directory in the volumes stored on its file server
140 machine. In other words, the group's members can exercise those two
141 permissions even when an entry for the group does not appear on an ACL. To
142 change the set of default permissions, use the B<-implicit> argument.
143
144 The File Server maintains a I<host current protection subgroup> (I<host
145 CPS>) for each client machine from which it has received a data access
146 request. Like the CPS for a user, a host CPS lists all of the Protection
147 Database groups to which the machine belongs, and the File Server compares
148 the host CPS to a directory's ACL to determine in what manner users on the
149 machine are authorized to access the directory's contents. When the B<pts
150 adduser> or B<pts removeuser> command is used to change the groups to
151 which a machine belongs, the File Server must recompute the machine's host
152 CPS in order to notice the change. By default, the File Server contacts
153 the Protection Server every two hours to recompute host CPSs, implying
154 that it can take that long for changed group memberships to become
155 effective. To change this frequency, use the B<-hr> argument.
156
157 The File Server generates the following message when a partition is nearly
158 full:
159
160    No space left on device
161
162 This command does not use the syntax conventions of the AFS command
163 suites. Provide the command name and all option names in full.
164
165 =head1 CAUTIONS
166
167 Do not use the B<-k> and -w arguments, which are intended for use by the
168 AFS Development group only. Changing them from their default values can
169 result in unpredictable File Server behavior.  In any case, on many
170 operating systems the File Server uses native threads rather than the LWP
171 threads, so using the B<-k> argument to set the number of LWP threads has
172 no effect.
173
174 Do not specify both the B<-spare> and B<-pctspare> arguments. Doing so
175 causes the File Server to exit, leaving an error message in the
176 F</usr/afs/logs/FileLog> file.
177
178 Options that are available only on some system types, such as the B<-m>
179 and B<-lock> options, appear in the output generated by the B<-help>
180 option only on the relevant system type.
181
182 =head1 OPTIONS
183
184 =over 4
185
186 =item B<-d> <I<debug level>>
187
188 Sets the detail level for the debugging trace written to the
189 F</usr/afs/logs/FileLog> file. Provide one of the following values, each
190 of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
191 and C<125>. The default value of C<0> produces only a few messages.
192
193 =item B<-p> <I<number of processes>>
194
195 Sets the number of threads to run. Provide a positive integer. The File
196 Server creates and uses five threads for special purposes, in addition to
197 the number specified (but if this argument specifies the maximum possible
198 number, the File Server automatically uses five of the threads for its own
199 purposes).
200
201 The maximum number of threads can differ in each release of AFS.  Consult
202 the I<IBM AFS Release Notes> for the current release.
203
204 =item B<-spare> <I<number of spare blocks>>
205
206 Specifies the number of additional kilobytes an application can store in a
207 volume after the quota is exceeded. Provide a positive integer; a value of
208 C<0> prevents the volume from ever exceeding its quota. Do not combine
209 this argument with the B<-pctspare> argument.
210
211 =item B<-pctspare> <I<percentage spare>>
212
213 Specifies the amount by which the File Server allows a volume to exceed
214 its quota, as a percentage of the quota. Provide an integer between C<0>
215 and C<99>. A value of C<0> prevents the volume from ever exceeding its
216 quota. Do not combine this argument with the B<-spare> argument.
217
218 =item B<-b> <I<buffers>>
219
220 Sets the number of directory buffers. Provide a positive integer.
221
222 =item B<-l> <I<large vnodes>>
223
224 Sets the number of large vnodes available in memory for caching directory
225 elements. Provide a positive integer.
226
227 =item B<-s> <I<small nodes>>
228
229 Sets the number of small vnodes available in memory for caching file
230 elements. Provide a positive integer.
231
232 =item B<-vc> <I<volume cachesize>>
233
234 Sets the number of volumes the File Server can cache in memory.  Provide a
235 positive integer.
236
237 =item B<-w> <I<call back wait interval>>
238
239 Sets the interval at which the daemon spawned by the File Server performs
240 its maintenance tasks. Do not use this argument; changing the default
241 value can cause unpredictable behavior.
242
243 =item B<-cb> <I<number of callbacks>>
244
245 Sets the number of callbacks the File Server can track. Provide a positive
246 integer.
247
248 =item B<-banner>
249
250 Prints the following banner to F</dev/console> about every 10 minutes.
251
252    File Server is running at I<time>.
253
254 =item B<-novbc>
255
256 Prevents the File Server from breaking the callbacks that Cache Managers
257 hold on a volume that the File Server is reattaching after the volume was
258 offline (as a result of the B<vos restore> command, for example). Use of
259 this flag is strongly discouraged.
260
261 =item B<-implicit> <I<admin mode bits>>
262
263 Defines the set of permissions granted by default to the
264 system:administrators group on the ACL of every directory in a volume
265 stored on the file server machine. Provide one or more of the standard
266 permission letters (C<rlidwka>) and auxiliary permission letters
267 (C<ABCDEFGH>), or one of the shorthand notations for groups of permissions
268 (C<all>, C<none>, C<read>, and C<write>). To review the meaning of the
269 permissions, see the B<fs setacl> reference page.
270
271 =item B<-hr> <I<number of hours between refreshing the host cps>>
272
273 Specifies how often the File Server refreshes its knowledge of the
274 machines that belong to protection groups (refreshes the host CPSs for
275 machines). The File Server must update this information to enable users
276 from machines recently added to protection groups to access data for which
277 those machines now have the necessary ACL permissions.
278
279 =item B<-busyat> <I<< redirect clients when queue > n >>>
280
281 Defines the number of incoming RPCs that can be waiting for a response
282 from the File Server before the File Server returns the error code
283 C<VBUSY> to the Cache Manager that sent the latest RPC. In response, the
284 Cache Manager retransmits the RPC after a delay. This argument prevents
285 the accumulation of so many waiting RPCs that the File Server can never
286 process them all. Provide a positive integer.  The default value is
287 C<600>.
288
289 =item B<-rxpck> <I<number of rx extra packets>>
290
291 Controls the number of Rx packets the File Server uses to store data for
292 incoming RPCs that it is currently handling, that are waiting for a
293 response, and for replies that are not yet complete. Provide a positive
294 integer.
295
296 =item B<-rxdbg>
297
298 Writes a trace of the File Server's operations on Rx packets to the file
299 F</usr/afs/logs/rx_dbg>.
300
301 =item F<-rxdbge>
302
303 Writes a trace of the File Server's operations on Rx events (such as
304 retransmissions) to the file F</usr/afs/logs/rx_dbg>.
305
306 =item F<-m> <I<min percentage spare in partition>>
307
308 Specifies the percentage of each AFS server partition that the AIX version
309 of the File Server creates as a reserve. Specify an integer value between
310 C<0> and C<30>; the default is 8%. A value of C<0> means that the
311 partition can become completely full, which can have serious negative
312 consequences.
313
314 =item B<-lock>
315
316 Prevents any portion of the fileserver binary from being paged (swapped)
317 out of memory on a file server machine running the IRIX operating system.
318
319 =item B<-L>
320
321 Sets values for many arguments in a manner suitable for a large file
322 server machine. Combine this flag with any option except the B<-S> flag;
323 omit both flags to set values suitable for a medium-sized file server
324 machine.
325
326 =item B<-S>
327
328 Sets values for many arguments in a manner suitable for a small file
329 server machine. Combine this flag with any option except the B<-L> flag;
330 omit both flags to set values suitable for a medium-sized file server
331 machine.
332
333 =item B<-k> <I<stack size>>
334
335 Sets the LWP stack size in units of 1 kilobyte. Do not use this argument,
336 and in particular do not specify a value less than the default of C<24>.
337
338 =item B<-realm> <I<Kerberos realm name>>
339
340 Defines the Kerberos realm name for the File Server to use. If this
341 argument is not provided, it uses the realm name corresponding to the cell
342 listed in the local F</usr/afs/etc/ThisCell> file.
343
344 =item B<-udpsize> <I<size of socket buffer in bytes>>
345
346 Sets the size of the UDP buffer, which is 64 KB by default. Provide a
347 positive integer, preferably larger than the default.
348
349 =item B<-enable_peer_stats>
350
351 Activates the collection of Rx statistics and allocates memory for their
352 storage. For each connection with a specific UDP port on another machine,
353 a separate record is kept for each type of RPC (FetchFile, GetStatus, and
354 so on) sent or received. To display or otherwise access the records, use
355 the Rx Monitoring API.
356
357 =item B<-enable_process_stats>
358
359 Activates the collection of Rx statistics and allocates memory for their
360 storage. A separate record is kept for each type of RPC (FetchFile,
361 GetStatus, and so on) sent or received, aggregated over all connections to
362 other machines. To display or otherwise access the records, use the Rx
363 Monitoring API.
364
365 =item B<-help>
366
367 Prints the online help for this command. All other valid options are
368 ignored.
369
370 =back
371
372 =head1 EXAMPLES
373
374 The following B<bos create> command creates an fs process on the file
375 server machine C<fs2.abc.com> that uses the large configuration size, and
376 allows volumes to exceed their quota by 10%. Type the command on a single
377 line:
378
379    % bos create -server fs2.abc.com -instance fs -type fs \
380                 -cmd "/usr/afs/bin/fileserver -pctspare 10 \
381                 -L" /usr/afs/bin/volserver /usr/afs/bin/salvager
382
383 =head1 PRIVILEGE REQUIRED
384
385 The issuer must be logged in as the superuser C<root> on a file server
386 machine to issue the command at a command shell prompt. It is conventional
387 instead to create and start the process by issuing the B<bos create>
388 command.
389
390 =head1 SEE ALSO
391
392 L<BosConfig(5)>,
393 L<FileLog(5)>,
394 L<bos_create(8)>,
395 L<bos_getlog(8)>,
396 L<fs_setacl(1)>,
397 L<salvager(8)>,
398 L<volserver(8)>
399
400 =head1 COPYRIGHT
401
402 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
403
404 This documentation is covered by the IBM Public License Version 1.0.  It was
405 converted from HTML to POD by software written by Chas Williams and Russ
406 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.