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