Fix typo in bos_create manpage
[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 =for html
8 <div class="synopsis">
9
10 B<fileserver> S<<< [B<-auditlog> <I<path to log file>>] >>>
11     S<<< [B<-audit-interface> (file | sysvmq)] >>>
12     S<<< [B<-d> <I<debug level>>] >>>
13     S<<< [B<-p> <I<number of processes>>] >>>
14     S<<< [B<-spare> <I<number of spare blocks>>] >>>
15     S<<< [B<-pctspare> <I<percentage spare>>] >>>
16     S<<< [B<-b> <I<buffers>>] >>>
17     S<<< [B<-l> <I<large vnodes>>] >>>
18     S<<< [B<-s> <I<small vnodes>>] >>>
19     S<<< [B<-vc> <I<volume cachesize>>] >>>
20     S<<< [B<-w> <I<call back wait interval>>] >>>
21     S<<< [B<-cb> <I<number of call backs>>] >>>
22     S<<< [B<-banner>] >>>
23     S<<< [B<-novbc>] >>>
24     S<<< [B<-implicit> <I<admin mode bits: rlidwka>>] >>>
25     S<<< [B<-readonly>] >>>
26     S<<< [B<-hr> <I<number of hours between refreshing the host cps>>] >>>
27     S<<< [B<-busyat> <I<< redirect clients when queue > n >>>] >>>
28     S<<< [B<-nobusy>] >>>
29     S<<< [B<-rxpck> <I<number of rx extra packets>>] >>>
30     S<<< [B<-rxdbg>] >>>
31     S<<< [B<-rxdbge>] >>>
32     S<<< [B<-rxmaxmtu> <I<bytes>>] >>>
33     S<<< [B<-nojumbo> >>>
34     S<<< [B<-jumbo> >>>
35     S<<< [B<-rxbind> >>>
36     S<<< [B<-allow-dotted-principals>] >>>
37     S<<< [B<-L>] >>>
38     S<<< [B<-S>] >>>
39     S<<< [B<-k> <I<stack size>>] >>>
40     S<<< [B<-realm> <I<Kerberos realm name>>] >>>
41     S<<< [B<-udpsize> <I<size of socket buffer in bytes>>] >>>
42     S<<< [B<-sendsize> <I<size of send buffer in bytes>>] >>>
43     S<<< [B<-abortthreshold> <I<abort threshold>>] >>>
44     S<<< [B<-enable_peer_stats>] >>>
45     S<<< [B<-enable_process_stats>] >>>
46     S<<< [B<-syslog> [<I< loglevel >>]] >>>
47     S<<< [B<-mrafslogs>] >>>
48     S<<< [B<-saneacls>] >>>
49     S<<< [B<-help>] >>>
50     S<<< [B<-fs-state-dont-save>] >>>
51     S<<< [B<-fs-state-dont-restore>] >>>
52     S<<< [B<-fs-state-verify>] (none | save | restore | both)] >>>
53     S<<< [B<-vhandle-setaside> <I<fds reserved for non-cache io>>] >>>
54     S<<< [B<-vhandle-max-cachesize> <I<max open files>>] >>>
55     S<<< [B<-vhandle-initial-cachesize> <I<fds reserved for non-cache io>>] >>>
56     S<<< [B<-vhashsize> <I<log(2) of number of volume hash buckets>>] >>>
57     S<<< [B<-vlrudisable>] >>>
58     S<<< [B<-vlruthresh> <I<minutes before eligibility for soft detach>>] >>>
59     S<<< [B<-vlruinterval> <I<seconds between VLRU scans>>] >>>
60     S<<< [B<-vlrumax> <I<max volumes to soft detach in one VLRU scan>>] >>>
61     S<<< [B<-vattachpar> <I<number of volume attach threads>>] >>>
62     S<<< [B<-m> <I<min percentage spare in partition>>] >>>
63     S<<< [B<-lock>] >>>
64
65 =for html
66 </div>
67
68 =head1 DESCRIPTION
69
70 The B<fileserver> command initializes the File Server component of the
71 C<fs> process. In the conventional configuration, its binary file is
72 located in the F</usr/afs/bin> directory on a file server machine.
73
74 The B<fileserver> command is not normally issued at the command shell
75 prompt, but rather placed into a database server machine's
76 F</usr/afs/local/BosConfig> file with the B<bos create> command. If it is
77 ever issued at the command shell prompt, the issuer must be logged onto a
78 file server machine as the local superuser C<root>.
79
80 The File Server creates the F</usr/afs/logs/FileLog> log file as it
81 initializes, if the file does not already exist. It does not write a
82 detailed trace by default, but the B<-d> option may be used to
83 increase the amount of detail. Use the B<bos getlog> command to
84 display the contents of the log file.
85
86 The command's arguments enable the administrator to control many aspects
87 of the File Server's performance, as detailed in L<OPTIONS>.  By default
88 the B<fileserver> command sets values for many arguments that are suitable
89 for a medium-sized file server machine. To set values suitable for a small
90 or large file server machine, use the B<-S> or B<-L> flag
91 respectively. The following list describes the parameters and
92 corresponding argument for which the B<fileserver> command sets default
93 values, and the table below summarizes the setting for each of the three
94 machine sizes.
95
96 =over 4
97
98 =item *
99
100 The maximum number of lightweight processes (LWPs) or pthreads 
101 the File Server uses to handle requests for data; corresponds to the 
102 B<-p> argument. The File Server always uses a minimum of 32 KB of 
103 memory for these processes.
104
105 =item *
106
107 The maximum number of directory blocks the File Server caches in memory;
108 corresponds to the B<-b> argument. Each cached directory block (buffer)
109 consumes 2,092 bytes of memory.
110
111 =item *
112
113 The maximum number of large vnodes the File Server caches in memory for
114 tracking directory elements; corresponds to the B<-l> argument. Each large
115 vnode consumes 292 bytes of memory.
116
117 =item *
118
119 The maximum number of small vnodes the File Server caches in memory for
120 tracking file elements; corresponds to the B<-s> argument.  Each small
121 vnode consumes 100 bytes of memory.
122
123 =item *
124
125 The maximum volume cache size, which determines how many volumes the File
126 Server can cache in memory before having to retrieve data from disk;
127 corresponds to the B<-vc> argument.
128
129 =item *
130
131 The maximum number of callback structures the File Server caches in
132 memory; corresponds to the B<-cb> argument. Each callback structure
133 consumes 16 bytes of memory.
134
135 =item *
136
137 The maximum number of Rx packets the File Server uses; corresponds to the
138 B<-rxpck> argument. Each packet consumes 1544 bytes of memory.
139
140 =back
141
142 The default values are:
143
144   Parameter (Argument)               Small (-S)     Medium   Large (-L)
145   ---------------------------------------------------------------------
146   Number of LWPs (-p)                        6           9          128
147   Number of cached dir blocks (-b)          70          90          120
148   Number of cached large vnodes (-l)       200         400          600
149   Number of cached small vnodes (-s)       200         400          600
150   Maximum volume cache size (-vc)          200         400          600
151   Number of callbacks (-cb)             20,000      60,000       64,000
152   Number of Rx packets (-rxpck)            100         150          200
153
154 To override any of the values, provide the indicated argument (which can
155 be combined with the B<-S> or B<-L> flag).
156
157 The amount of memory required for the File Server varies. The approximate
158 default memory usage is 751 KB when the B<-S> flag is used (small
159 configuration), 1.1 MB when all defaults are used (medium configuration),
160 and 1.4 MB when the B<-L> flag is used (large configuration). If
161 additional memory is available, increasing the value of the B<-cb> and
162 B<-vc> arguments can improve File Server performance most directly.
163
164 By default, the File Server allows a volume to exceed its quota by 1 MB
165 when an application is writing data to an existing file in a volume that
166 is full. The File Server still does not allow users to create new files in
167 a full volume. To change the default, use one of the following arguments:
168
169 =over 4
170
171 =item *
172
173 Set the B<-spare> argument to the number of extra kilobytes that the File
174 Server allows as overage. A value of C<0> allows no overage.
175
176 =item *
177
178 Set the B<-pctspare> argument to the percentage of the volume's quota the
179 File Server allows as overage.
180
181 =back
182
183 By default, the File Server implicitly grants the C<a> (administer) and
184 C<l> (lookup) permissions to system:administrators on the access control
185 list (ACL) of every directory in the volumes stored on its file server
186 machine. In other words, the group's members can exercise those two
187 permissions even when an entry for the group does not appear on an ACL. To
188 change the set of default permissions, use the B<-implicit> argument.
189
190 The File Server maintains a I<host current protection subgroup> (I<host
191 CPS>) for each client machine from which it has received a data access
192 request. Like the CPS for a user, a host CPS lists all of the Protection
193 Database groups to which the machine belongs, and the File Server compares
194 the host CPS to a directory's ACL to determine in what manner users on the
195 machine are authorized to access the directory's contents. When the B<pts
196 adduser> or B<pts removeuser> command is used to change the groups to
197 which a machine belongs, the File Server must recompute the machine's host
198 CPS in order to notice the change. By default, the File Server contacts
199 the Protection Server every two hours to recompute host CPSs, implying
200 that it can take that long for changed group memberships to become
201 effective. To change this frequency, use the B<-hr> argument.
202
203 The File Server stores volumes in partitions. A partition is a
204 filesystem or directory on the server machine that is named C</vicepX>
205 or C</vicepXX> where XX is "a" through "z" or "aa" though "iv". Up to
206 255 partitions are allowed. The File Server expects that the /vicepXX
207 directories are each on a dedicated filesystem. The File Server will
208 only use a /vicepXX if it's a mountpoint for another filesystem,
209 unless the file C</vicepXX/AlwaysAttach> exists. The data in the
210 partition is a special format that can only be access using OpenAFS
211 commands or an OpenAFS client.
212
213 The File Server generates the following message when a partition is nearly
214 full:
215
216    No space left on device
217
218 This command does not use the syntax conventions of the AFS command
219 suites. Provide the command name and all option names in full.
220
221 =head1 CAUTIONS
222
223 There are two strategies the File Server can use for attaching AFS volumes
224 at startup and handling volume salvages.  The traditional method assumes
225 all volumes are salvaged before the File Server starts and attaches all
226 volumes at start before serving files.  The newer demand-attach method
227 attaches volumes only on demand, salvaging them at that time as needed,
228 and detaches volumes that are not in use.  A demand-attach File Server can
229 also save state to disk for faster restarts.
230
231 The choice of traditional or demand-attach File Server must be made at
232 compile time, and the required setup in F<BosConfig> is different for the
233 two servers.  When changing from a traditional File Server to
234 demand-attach or vice versa, you will need to stop and remove the C<fs> or
235 C<dafs> node in F<BosConfig> and create a new node of the appropriate
236 type.  See L<bos_create(8)> for more information.
237
238 Do not use the B<-k> and B<-w> arguments, which are intended for use
239 by the OpenAFS developers only. Changing them from their default
240 values can result in unpredictable File Server behavior.  In any case,
241 on many operating systems the File Server uses native threads rather
242 than the LWP threads, so using the B<-k> argument to set the number of
243 LWP threads has no effect.
244
245 Do not specify both the B<-spare> and B<-pctspare> arguments. Doing so
246 causes the File Server to exit, leaving an error message in the
247 F</usr/afs/logs/FileLog> file.
248
249 Options that are available only on some system types, such as the B<-m>
250 and B<-lock> options, appear in the output generated by the B<-help>
251 option only on the relevant system type.
252
253 Currently, the maximum size of a volume is 2 terabytes (2^31 bytes)
254 and the maximum size of a /vicepX partition on a fileserver is 2^64
255 kilobytes. The maximum partition size in releases 1.4.7 and earlier is
256 2 terabytes (2^31 bytes). The maximum partition size for 1.5.x
257 releases 1.5.34 and earlier is 2 terabytes as well.
258
259 The maximum number of directory entries is 64,000 if all of the entries
260 have names that are 15 octets or less in length. A name that is 15 octets
261 long requires the use of only one block in the directory. Additional
262 sequential blocks are required to store entries with names that are longer
263 than 15 octets. Each additional block provides an additional length of 32
264 octets for the name of the entry. Note that if file names use an encoding
265 like UTF-8, a single character may be encoded into multiple octets.
266
267 In real world use, the maximum number of objects in an AFS directory
268 is usually between 16,000 and 25,000, depending on the average name
269 length.
270
271 =head1 OPTIONS
272
273 =over 4
274
275 =item B<-auditlog> <I<log path>>
276
277 Turns on audit logging, and sets the path for the audit log.  The audit
278 log records information about RPC calls, including the name of the RPC
279 call, the host that submitted the call, the authenticated entity (user)
280 that issued the call, the parameters for the call, and if the call
281 succeeded or failed.
282
283 =item B<-audit-interface> (file | sysvmq)
284
285 Specifies what audit interface to use. The C<file> interface writes audit
286 messages to the file passed to B<-auditlog>. The C<sysvmq> interface
287 writes audit messages to a SYSV message (see L<msgget(2)> and
288 L<msgrcv(2)>). The message queue the C<sysvmq> interface writes to has the
289 key C<ftok(path, 1)>, where C<path> is the path specified in the
290 B<-auditlog> option.
291
292 Defaults to C<file>.
293
294 =item B<-d> <I<debug level>>
295
296 Sets the detail level for the debugging trace written to the
297 F</usr/afs/logs/FileLog> file. Provide one of the following values, each
298 of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
299 and C<125>. The default value of C<0> produces only a few messages.
300
301 =item B<-p> <I<number of processes>>
302
303 Sets the number of threads (or LWPs) to run. Provide a positive integer. 
304 The File Server creates and uses five threads for special purposes, 
305 in addition to the number specified (but if this argument specifies 
306 the maximum possible number, the File Server automatically uses five 
307 of the threads for its own purposes).
308
309 The maximum number of threads can differ in each release of OpenAFS.
310 Consult the I<OpenAFS Release Notes> for the current release.
311
312 =item B<-spare> <I<number of spare blocks>>
313
314 Specifies the number of additional kilobytes an application can store in a
315 volume after the quota is exceeded. Provide a positive integer; a value of
316 C<0> prevents the volume from ever exceeding its quota. Do not combine
317 this argument with the B<-pctspare> argument.
318
319 =item B<-pctspare> <I<percentage spare>>
320
321 Specifies the amount by which the File Server allows a volume to exceed
322 its quota, as a percentage of the quota. Provide an integer between C<0>
323 and C<99>. A value of C<0> prevents the volume from ever exceeding its
324 quota. Do not combine this argument with the B<-spare> argument.
325
326 =item B<-b> <I<buffers>>
327
328 Sets the number of directory buffers. Provide a positive integer.
329
330 =item B<-l> <I<large vnodes>>
331
332 Sets the number of large vnodes available in memory for caching directory
333 elements. Provide a positive integer.
334
335 =item B<-s> <I<small nodes>>
336
337 Sets the number of small vnodes available in memory for caching file
338 elements. Provide a positive integer.
339
340 =item B<-vc> <I<volume cachesize>>
341
342 Sets the number of volumes the File Server can cache in memory.  Provide a
343 positive integer.
344
345 =item B<-w> <I<call back wait interval>>
346
347 Sets the interval at which the daemon spawned by the File Server performs
348 its maintenance tasks. Do not use this argument; changing the default
349 value can cause unpredictable behavior.
350
351 =item B<-cb> <I<number of callbacks>>
352
353 Sets the number of callbacks the File Server can track. Provide a positive
354 integer.
355
356 =item B<-banner>
357
358 Prints the following banner to F</dev/console> about every 10 minutes.
359
360    File Server is running at I<time>.
361
362 =item B<-novbc>
363
364 Prevents the File Server from breaking the callbacks that Cache Managers
365 hold on a volume that the File Server is reattaching after the volume was
366 offline (as a result of the B<vos restore> command, for example). Use of
367 this flag is strongly discouraged.
368
369 =item B<-implicit> <I<admin mode bits>>
370
371 Defines the set of permissions granted by default to the
372 system:administrators group on the ACL of every directory in a volume
373 stored on the file server machine. Provide one or more of the standard
374 permission letters (C<rlidwka>) and auxiliary permission letters
375 (C<ABCDEFGH>), or one of the shorthand notations for groups of permissions
376 (C<all>, C<none>, C<read>, and C<write>). To review the meaning of the
377 permissions, see the B<fs setacl> reference page.
378
379 =item B<-readonly>
380
381 Don't allow writes to this fileserver.
382
383 =item B<-hr> <I<number of hours between refreshing the host cps>>
384
385 Specifies how often the File Server refreshes its knowledge of the
386 machines that belong to protection groups (refreshes the host CPSs for
387 machines). The File Server must update this information to enable users
388 from machines recently added to protection groups to access data for which
389 those machines now have the necessary ACL permissions.
390
391 =item B<-busyat> <I<< redirect clients when queue > n >>>
392
393 Defines the number of incoming RPCs that can be waiting for a response
394 from the File Server before the File Server returns the error code
395 C<VBUSY> to the Cache Manager that sent the latest RPC. In response, the
396 Cache Manager retransmits the RPC after a delay. This argument prevents
397 the accumulation of so many waiting RPCs that the File Server can never
398 process them all. Provide a positive integer.  The default value is
399 C<600>.
400
401 =item B<-rxpck> <I<number of rx extra packets>>
402
403 Controls the number of Rx packets the File Server uses to store data for
404 incoming RPCs that it is currently handling, that are waiting for a
405 response, and for replies that are not yet complete. Provide a positive
406 integer.
407
408 =item B<-rxdbg>
409
410 Writes a trace of the File Server's operations on Rx packets to the file
411 F</usr/afs/logs/rx_dbg>.
412
413 =item B<-rxdbge>
414
415 Writes a trace of the File Server's operations on Rx events (such as
416 retransmissions) to the file F</usr/afs/logs/rx_dbg>.
417
418 =item B<-rxmaxmtu> <I<bytes>>
419
420 Defines the maximum size of an MTU.  The value must be between the
421 minimum and maximum packet data sizes for Rx.
422
423 =item B<-jumbo>
424
425 Allows the server to send and receive jumbograms. A jumbogram is
426 a large-size packet composed of 2 to 4 normal Rx data packets that share
427 the same header. The fileserver does not use jumbograms by default, as some
428 routers are not capable of properly breaking the jumbogram into smaller
429 packets and reassembling them.
430
431 =item B<-nojumbo>
432
433 Deprecated; jumbograms are disabled by default.
434
435 =item B<-rxbind>
436
437 Force the fileserver to only bind to one IP address.
438
439 =item B<-allow-dotted-principals>
440
441 By default, the RXKAD security layer will disallow access by Kerberos
442 principals with a dot in the first component of their name. This is to avoid
443 the confusion where principals user/admin and user.admin are both mapped to the
444 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
445 between principal names may disable this check by starting the server
446 with this option.
447
448 =item B<-L>
449
450 Sets values for many arguments in a manner suitable for a large file
451 server machine. Combine this flag with any option except the B<-S> flag;
452 omit both flags to set values suitable for a medium-sized file server
453 machine.
454
455 =item B<-S>
456
457 Sets values for many arguments in a manner suitable for a small file
458 server machine. Combine this flag with any option except the B<-L> flag;
459 omit both flags to set values suitable for a medium-sized file server
460 machine.
461
462 =item B<-k> <I<stack size>>
463
464 Sets the LWP stack size in units of 1 kilobyte. Do not use this argument,
465 and in particular do not specify a value less than the default of C<24>.
466
467 =item B<-realm> <I<Kerberos realm name>>
468
469 Defines the Kerberos realm name for the File Server to use. If this
470 argument is not provided, it uses the realm name corresponding to the cell
471 listed in the local F</usr/afs/etc/ThisCell> file.
472
473 =item B<-udpsize> <I<size of socket buffer in bytes>>
474
475 Sets the size of the UDP buffer, which is 64 KB by default. Provide a
476 positive integer, preferably larger than the default.
477
478 =item B<-sendsize> <I<size of send buffer in bytes>>
479
480 Sets the size of the send buffer, which is 16384 bytes by default.
481
482 =item B<-abortthreshold> <I<abort threshold>>
483
484 Sets the abort threshold, which is triggered when an AFS client sends
485 a number of FetchStatus requests in a row and all of them fail due to
486 access control or some other error. When the abort threshold is
487 reached, the file server starts to slow down the responses to the
488 problem client in order to reduce the load on the file server.
489
490 The throttling behaviour can cause issues especially for some versions
491 of the Windows OpenAFS client. When using Windows Explorer to navigate
492 the AFS directory tree, directories with only "look" access for the
493 current user may load more slowly because of the throttling. This is
494 because the Windows OpenAFS client sends FetchStatus calls one at a
495 time instead of in bulk like the Unix Open AFS client.
496
497 Setting the threshold to 0 disables the throttling behavior. This
498 option is available in OpenAFS versions 1.4.1 and later.
499
500 =item B<-enable_peer_stats>
501
502 Activates the collection of Rx statistics and allocates memory for their
503 storage. For each connection with a specific UDP port on another machine,
504 a separate record is kept for each type of RPC (FetchFile, GetStatus, and
505 so on) sent or received. To display or otherwise access the records, use
506 the Rx Monitoring API.
507
508 =item B<-enable_process_stats>
509
510 Activates the collection of Rx statistics and allocates memory for their
511 storage. A separate record is kept for each type of RPC (FetchFile,
512 GetStatus, and so on) sent or received, aggregated over all connections to
513 other machines. To display or otherwise access the records, use the Rx
514 Monitoring API.
515
516 =item B<-syslog [<loglevel>]
517
518 Use syslog instead of the normal logging location for the fileserver
519 process.  If provided, log messages are at <loglevel> instead of the
520 default LOG_USER.
521
522 =item B<-mrafslogs>
523
524 Use MR-AFS (Multi-Resident) style logging.  This option is deprecated.
525
526 =item B<-saneacls>
527
528 Offer the SANEACLS capability for the fileserver.  This option is
529 currently unimplemented.
530
531 =item B<-help>
532
533 Prints the online help for this command. All other valid options are
534 ignored.
535
536 =item B<-fs-state-dont-save>
537
538 When present, fileserver state will not be saved during shutdown.  Default
539 is to save state.
540
541 This option is only supported by the demand-attach file server.
542
543 =item B<-fs-state-dont-restore>
544
545 When present, fileserver state will not be restored during startup.
546 Default is to restore state on startup.
547
548 This option is only supported by the demand-attach file server.
549
550 =item B<-fs-state-verify> (none | save | restore | both)
551
552 This argument controls the behavior of the state verification mechanism.
553 A value of C<none> turns off all verification.  A value of C<save> only
554 performs the verification steps prior to saving state to disk.  A value
555 of C<restore> only performs the verification steps after restoring state
556 from disk.  A value of C<both> performs all verifications steps both
557 prior to save and following a restore.
558
559 The default is C<both>.
560
561 This option is only supported by the demand-attach file server.
562
563 =item B<-vhandle-setaside> <I<fds reserved for non-cache io>>
564
565 Number of file handles set aside for I/O not in the cache. Defaults to 128.
566
567 =item B<-vhandle-max-cachesize> <I<max open files>>
568
569 Maximum number of available file handles.
570
571 =item B<-vhandle-initial-cachesize> <I<initial open file cache>>
572
573 Number of file handles set aside for I/O in the cache. Defaults to 128.
574
575 =item B<-vhashsize <I<size>>
576
577 The log(2) number of of volume hash buckets.  Default is 8 (i.e., by
578 default, there are 2^8 = 256 volume hash buckets).
579
580 This option is only supported by the demand-attach file server.
581
582 =item B<-vlruthresh <I<minutes>>
583
584 The number of minutes of inactivity before a volume is eligible for soft
585 detachment.  Default is 120 minutes.
586
587 This option is only supported by the demand-attach file server.
588
589 =item B<-vlruinterval <I<seconds>>
590
591 The number of seconds between VLRU candidate queue scan.  The default is
592 120 seconds.
593
594 This option is only supported by the demand-attach file server.
595
596 =item B<-vlrumax <I<positive integer>>
597
598 The maximum number of volumes which can be soft detached in a single pass
599 of the scanner.  Default is 8 volumes.
600
601 This option is only supported by the demand-attach file server.
602
603 =item B<-vattachpar> <I<number of volume attach threads>>
604
605 The number of threads assigned to attach and detach volumes.  The default
606 is 1.  Warning: many of the I/O parallism features of Demand-Attach
607 Fileserver are turned off when the number of volume attach threads is only
608 1.
609
610 This option is only meaningful for a file server built with pthreads
611 support.
612
613 =item B<-m> <I<min percentage spare in partition>>
614
615 Specifies the percentage of each AFS server partition that the AIX version
616 of the File Server creates as a reserve. Specify an integer value between
617 C<0> and C<30>; the default is 8%. A value of C<0> means that the
618 partition can become completely full, which can have serious negative
619 consequences.  This option is not supported on platforms other than AIX.
620
621 =item B<-lock>
622
623 Prevents any portion of the fileserver binary from being paged (swapped)
624 out of memory on a file server machine running the IRIX operating system.
625 This option is not supported on platforms other than IRIX.
626
627 =back
628
629 =head1 EXAMPLES
630
631 The following B<bos create> command creates a traditional fs process on
632 the file server machine C<fs2.abc.com> that uses the large configuration
633 size, and allows volumes to exceed their quota by 10%. Type the command on
634 a single line:
635
636    % bos create -server fs2.abc.com -instance fs -type fs \
637                 -cmd "/usr/afs/bin/fileserver -pctspare 10 -L" \
638                 /usr/afs/bin/volserver /usr/afs/bin/salvager
639
640 The following is an equivalent B<bos create> command for a demand-attach
641 File Server:
642
643    % bos create -server fs2.abc.com -instance dafs -type dafs \
644                 -cmd "/usr/afs/bin/fileserver -pctspare 10 -L" \
645                 /usr/afs/bin/volserver \
646                 /usr/afs/bin/salvageserver \
647                 /usr/afs/bin/salvager
648
649 =head1 TROUBLESHOOTING
650
651 Sending process signals to the File Server Process can change its
652 behavior in the following ways:
653
654   Process          Signal       OS     Result
655   ---------------------------------------------------------------------
656
657   File Server      XCPU        Unix    Prints a list of client IP
658                                        Addresses.
659
660   File Server      USR2      Windows   Prints a list of client IP
661                                        Addresses.
662
663   File Server      POLL        HPUX    Prints a list of client IP
664                                        Addresses.
665
666   Any server       TSTP        Any     Increases Debug level by a power
667                                        of 5 -- 1,5,25,125, etc.
668                                        This has the same effect as the
669                                        -d XXX command-line option.
670
671   Any Server       HUP         Any     Resets Debug level to 0
672
673   File Server      TERM        Any     Run minor instrumentation over
674                                        the list of descriptors.
675
676   Other Servers    TERM        Any     Causes the process to quit.
677
678   File Server      QUIT        Any     Causes the File Server to Quit.
679                                        Bos Server knows this.
680
681 The basic metric of whether an AFS file server is doing well is the number
682 of connections waiting for a thread,
683 which can be found by running the following command:
684
685    % rxdebug <server> | grep waiting_for | wc -l
686
687 Each line returned by C<rxdebug> that contains the text "waiting_for"
688 represents a connection that's waiting for a file server thread.
689
690 If the blocked connection count is ever above 0, the server is having
691 problems replying to clients in a timely fashion.  If it gets above 10,
692 roughly, there will be noticeable slowness by the user.  The total number of
693 connections is a mostly irrelevant number that goes essentially
694 monotonically for as long as the server has been running and then goes back
695 down to zero when it's restarted.
696
697 The most common cause of blocked connections rising on a server is some
698 process somewhere performing an abnormal number of accesses to that server
699 and its volumes.  If multiple servers have a blocked connection count, the
700 most likely explanation is that there is a volume replicated between those
701 servers that is absorbing an abnormally high access rate.
702
703 To get an access count on all the volumes on a server, run:
704
705    % vos listvol <server> -long
706
707 and save the output in a file.  The results will look like a bunch of B<vos
708 examine> output for each volume on the server.  Look for lines like:
709
710    40065 accesses in the past day (i.e., vnode references)
711
712 and look for volumes with an abnormally high number of accesses.  Anything
713 over 10,000 is fairly high, but some volumes like root.cell and other
714 volumes close to the root of the cell will have that many hits routinely.
715 Anything over 100,000 is generally abnormally high.  The count resets about
716 once a day.
717
718 Another approach that can be used to narrow the possibilities for a
719 replicated volume, when multiple servers are having trouble, is to find all
720 replicated volumes for that server.  Run:
721
722    % vos listvldb -server <server>
723
724 where <server> is one of the servers having problems to refresh the VLDB
725 cache, and then run:
726
727    % vos listvldb -server <server> -part <partition>
728
729 to get a list of all volumes on that server and partition, including every
730 other server with replicas.
731
732 Once the volume causing the problem has been identified, the best way to
733 deal with the problem is to move that volume to another server with a low
734 load or to stop any runaway programs that are accessing that volume
735 unnecessarily.  Often the volume will be enough information to tell what's
736 going on.
737
738 If you still need additional information about who's hitting that server,
739 sometimes you can guess at that information from the failed callbacks in the
740 F<FileLog> log in F</var/log/afs> on the server, or from the output of:
741
742    % /usr/afsws/etc/rxdebug <server> -rxstats
743
744 but the best way is to turn on debugging output from the file server.
745 (Warning: This generates a lot of output into FileLog on the AFS server.)
746 To do this, log on to the AFS server, find the PID of the fileserver
747 process, and do:
748
749     kill -TSTP <pid>
750
751 where <pid> is the PID of the file server process.  This will raise the
752 debugging level so that you'll start seeing what people are actually doing
753 on the server.  You can do this up to three more times to get even more
754 output if needed.  To reset the debugging level back to normal, use (The
755 following command will NOT terminate the file server):
756
757     kill -HUP <pid>
758
759 The debugging setting on the File Server should be reset back to normal when
760 debugging is no longer needed.  Otherwise, the AFS server may well fill its
761 disks with debugging output.
762
763 The lines of the debugging output that are most useful for debugging load
764 problems are:
765
766     SAFS_FetchStatus,  Fid = 2003828163.77154.82248, Host 171.64.15.76
767     SRXAFS_FetchData, Fid = 2003828163.77154.82248
768
769 (The example above is partly truncated to highlight the interesting
770 information).  The Fid identifies the volume and inode within the volume;
771 the volume is the first long number.  So, for example, this was:
772
773    % vos examine 2003828163
774    pubsw.matlab61                   2003828163 RW    1040060 K  On-line
775        afssvr5.Stanford.EDU /vicepa 
776        RWrite 2003828163 ROnly 2003828164 Backup 2003828165 
777        MaxQuota    3000000 K 
778        Creation    Mon Aug  6 16:40:55 2001
779        Last Update Tue Jul 30 19:00:25 2002
780        86181 accesses in the past day (i.e., vnode references)
781
782        RWrite: 2003828163    ROnly: 2003828164    Backup: 2003828165
783        number of sites -> 3
784           server afssvr5.Stanford.EDU partition /vicepa RW Site 
785           server afssvr11.Stanford.EDU partition /vicepd RO Site 
786           server afssvr5.Stanford.EDU partition /vicepa RO Site 
787
788 and from the Host information one can tell what system is accessing that
789 volume.
790
791 Note that the output of L<vos_examine(1)> also includes the access count, so
792 once the problem has been identified, vos examine can be used to see if the
793 access count is still increasing.  Also remember that you can run vos
794 examine on the read-only replica (e.g., pubsw.matlab61.readonly) to see the
795 access counts on the read-only replica on all of the servers that it's
796 located on.
797
798 =head1 PRIVILEGE REQUIRED
799
800 The issuer must be logged in as the superuser C<root> on a file server
801 machine to issue the command at a command shell prompt.  It is conventional
802 instead to create and start the process by issuing the B<bos create>
803 command.
804
805 =head1 SEE ALSO
806
807 L<BosConfig(5)>,
808 L<FileLog(5)>,
809 L<bos_create(8)>,
810 L<bos_getlog(8)>,
811 L<fs_setacl(1)>,
812 L<msgget(2)>,
813 L<msgrcv(2)>,
814 L<salvager(8)>,
815 L<volserver(8)>,
816 L<vos_examine(1)>
817
818 =head1 COPYRIGHT
819
820 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
821
822 This documentation is covered by the IBM Public License Version 1.0.  It was
823 converted from HTML to POD by software written by Chas Williams and Russ
824 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.