FILESERVER(8)
๐ FILESERVER(8) ๐
AFS Command Reference
โจ NAME โจ
fileserver โ she boots up the File Server component of the fs process, and honestly? iconic behavior ๐ซถ
๐ฆ SYNOPSIS ๐ฆ
fileserver
[-auditlog <path to log file>]
[-audit-interface (file | sysvmq)]
[-d <debug level>]
[-p <number of processes>]
[-spare <number of spare blocks>]
[-pctspare <percentage spare>]
[-b <buffers>]
[-l <large vnodes>]
[-s <small vnodes>]
[-vc <volume cachesize>]
[-w <call back wait interval>]
[-cb <number of call backs>]
[-banner]
[-novbc]
[-implicit <admin mode bits: rlidwka>]
[-readonly]
[-admin-write]
[-hr <number of hours between refreshing the host cps>]
[-busyat <redirect clients when queue > n>]
[-nobusy]
[-rxpck <number of rx extra packets>]
[-rxdbg]
[-rxdbge]
[-rxmaxmtu <bytes>]
[-nojumbo]
[-jumbo]
[-rxbind]
[-allow-dotted-principals]
[-L]
[-S]
[-k <stack size>]
[-realm <Kerberos realm name>]
[-udpsize <size of socket buffer in bytes>]
[-sendsize <size of send buffer in bytes>]
[-abortthreshold <abort threshold>]
[-enable_peer_stats]
[-enable_process_stats]
[-syslog [< loglevel >]]
[-mrafslogs]
[-transarc-logs]
[-saneacls]
[-cve-2018-7168-enforce]
[-help]
[-vhandle-setaside <fds reserved for non-cache io>]
[-vhandle-max-cachesize <max open files>]
[-vhandle-initial-cachesize <fds reserved for non-cache io>]
[-vattachpar <number of volume attach threads>]
[-m <min percentage spare in partition>]
[-lock]
[-vhashsize <log(2) of number of volume hash buckets>]
[-offline-timeout <timeout in seconds>]
[-offline-shutdown-timeout <timeout in seconds>]
[-sync <sync behavior>]
[-logfile <log file] [-config <configuration path]
๐ธ DESCRIPTION ๐ธ
okay so, the fileserver command initializes the File Server component of the fs process. In the conventional setup, its binary file lives in the /usr/lib/openafs directory on a file server machine. lowkey the whole point of this thing ๐
Now here's the tea: you do not normally run fileserver by hand at the command shell prompt. Instead you tuck it into a database server machine's /etc/openafs/BosConfig file using the bos create command. And if you do ever issue it at the command shell prompt, you better be logged onto a file server machine as the local superuser root. no exceptions bestie ๐ญ
The File Server creates the /var/log/openafs/FileLog log file as it initializes, if that file doesn't already exist. By default it does not write a detailed trace, but the -d option can bump up the detail level. Wanna peek at what's in there? Use the bos getlog command to display the log file's contents. ๐
The command's arguments let the administrator control sooo many aspects of the File Server's performance โ all detailed down in OPTIONS. By default, the File Server picks values for a bunch of arguments that suit a medium-sized file server machine. Want settings for a small or large file server machine instead? Use the -S or -L flag respectively. Here's the rundown of every parameter (and its matching argument) that the File Server sets defaults for, plus a table below summarizing the setting for each of the three machine sizes:
- The maximum number of threads the File Server uses to handle requests for data โ that's the
-pargument. The File Server always uses a minimum of 32 KB of memory for these processes. - The maximum number of directory blocks the File Server caches in memory โ that's the
-bargument. Each cached directory block (buffer) eats up 2,092 bytes of memory. - The maximum number of large vnodes the File Server caches in memory for tracking directory elements โ that's the
-largument. Each large vnode eats 292 bytes of memory. - The maximum number of small vnodes the File Server caches in memory for tracking file elements โ that's the
-sargument. Each small vnode eats 100 bytes of memory. - The maximum volume cache size, which decides how many volumes the File Server can cache in memory before it has to go retrieve data from disk โ that's the
-vcargument. - The maximum number of callback structures the File Server caches in memory โ that's the
-cbargument. Each callback structure eats 16 bytes of memory. - The maximum number of Rx packets the File Server uses โ that's the
-rxpckargument. Each packet eats 1544 bytes of memory.
The default values are:
Parameter (Argument) Small (-S) Medium Large (-L)
---------------------------------------------------------------------
Number of threads (-p) 6 9 128
Number of cached dir blocks (-b) 70 90 120
Number of cached large vnodes (-l) 200 400 600
Number of cached small vnodes (-s) 200 400 600
Maximum volume cache size (-vc) 200 400 600
Number of callbacks (-cb) 20,000 60,000 64,000
Number of Rx packets (-rxpck) 100 150 200
To override any of these values, just hand over the indicated argument (and yeah, you can combine that with the -S or -L flag, go off โจ).
The amount of memory the File Server needs? It varies, bestie. The approximate default memory usage is 751 KB when the -S flag is used (small configuration), 1.1 MB when all defaults are used (medium configuration), and 1.4 MB when the -L flag is used (large configuration). And if you've got extra memory lying around, increasing the value of the -cb and -vc arguments can improve File Server performance most directly. it's giving "invest in your girl" ๐
By default, the File Server lets a volume exceed its quota by 1 MB when an application is writing data to an existing file in a volume that's already full. But heads up โ the File Server still does not allow users to create new files in a full volume. periodt. ๐ To change that default, use one of these:
- Set the
-spareargument to the number of extra kilobytes the File Server allows as overage. A value of0allows no overage at all. - Set the
-pctspareargument to the percentage of the volume's quota the File Server allows as overage.
By default, the File Server implicitly grants the a (administer) and l (lookup) permissions to system:administrators on the access control list (ACL) of every directory in the volumes stored on its file server machine. Basically โ members of that group can flex those two permissions even when an entry for the group isn't on the ACL. Want to change the set of default permissions? Use the -implicit argument. ๐ง
The File Server keeps a host current protection subgroup (host CPS) for each client machine it's gotten a data access request from. Like the CPS for a user, a host CPS lists all the Protection Database groups the machine belongs to, and the File Server compares the host CPS to a directory's ACL to figure out in what manner users on that machine are authorized to access the directory's contents. When the pts adduser or pts removeuser command changes the groups a machine belongs to, the File Server has to recompute that machine's host CPS to even notice the change. By default, the File Server contacts the Protection Server every two hours to recompute host CPSs โ which means it can take that long for changed group memberships to actually kick in. To change that frequency, use the -hr argument. โฐ
The File Server stores volumes in partitions. A partition is a filesystem or directory on the server machine named /vicepX or /vicepXX where XX is a through z or aa though iv. Up to 255 partitions are allowed. The File Server expects each of the /vicepXX directories to be on a dedicated filesystem. It'll only use a /vicepXX if it's a mountpoint for another filesystem โ unless the file /vicepXX/AlwaysAttach exists. And a partition will not be mounted if the file /vicepXX/NeverAttach exists. If both /vicepXX/AlwaysAttach and /vicepXX/NeverAttach are present? /vicepXX/AlwaysAttach wins, no debate. ๐ฅ The data in the partition is a special format that can only be accessed using OpenAFS commands or an OpenAFS client. iykyk.
The File Server generates the following message when a partition is nearly full:
No space left on device
One last thing โ this command does not use the syntax conventions of the AFS command suites. So provide the command name and all option names in full. no shortcuts, bestie ๐
okay that's the setup out of the way, but hold on โ the options? there are so many options, and they deserve their own moment. keep scrolling, we're not done ๐
๐ธ CAUTIONS ๐ธ
Okay bestie, listen up, because this part is the important part. Like, the part where if you don't read it, you're gonna have a bad time. ๐
There are two strategies the File Server can use for attaching AFS volumes at startup and handling volume salvages. Let's break it down:
- The traditional method assumes all volumes are salvaged before the File Server starts, and attaches all volumes at start before serving files.
- The newer demand-attach method attaches volumes only on demand, salvaging them at that time as needed, and detaches volumes that are not in use. A demand-attach File Server can also save state to disk for faster restarts.
And which binary does which? The dafileserver implements the demand-attach method, while fileserver uses the traditional method. That's the whole vibe, no cap. โจ
The choice of traditional or demand-attach File Server changes the required setup in BosConfig. So when you're changing from a traditional File Server to demand-attach (or the other way around โ either direction, we don't judge), you will need to stop and remove the "fs" or "dafs" node in BosConfig and create a new node of the appropriate type. See bos_create(8) for more information. ๐ซถ
Bestie. Do not use the -w argument. It's intended for use by the OpenAFS developers only. Changing it from its default values can result in unpredictable File Server behavior. Like, unpredictable as in "why is my server like this" unpredictable. Leave it alone. ๐
Do not specify both the-spareand-pctsparearguments. Doing so causes the File Server to exit, leaving an error message in the/var/log/openafs/FileLogfile. It's giving "self-destruct but make it documented." ๐
Some options are available only on some system types, such as the -m and -lock options, and those appear in the output generated by the -help option only on the relevant system type. So if you don't see them, it's not a you problem, it's a platform thing. ๐
๐ the size limits, aka the numbers you need ๐
Currently, the maximum size of a volume quota is 2 terabytes (2^41 bytes) and the maximum size of a /vicepX partition on a fileserver is 2^64 kilobytes.
The maximum partition size in releases 1.4.7 and earlier is 2 terabytes (2^31 bytes). The maximum partition size for 1.5.x releases 1.5.34 and earlier is 2 terabytes as well.
The maximum number of directory entries is 64,000 if all of the entries have names that are 15 octets or less in length. A name that is 15 octets long requires the use of only one block in the directory. Additional sequential blocks are required to store entries with names that are longer than 15 octets. Each additional block provides an additional length of 32 octets for the name of the entry. Note that if file names use an encoding like UTF-8, a single character may be encoded into multiple octets. (Yeah. One character, many octets. The audacity. ๐ญ)
In real world use, the maximum number of objects in an AFS directory is usually between 16,000 and 25,000, depending on the average name length. So like, plan accordingly, bestie.
โจ OPTIONS โจ
Every single flag, right here, in order. Grab a snack. ๐
-auditlog <log path>โ Turns on audit logging, and sets the path for the audit log. The audit log records information about RPC calls, including the name of the RPC call, the host that submitted the call, the authenticated entity (user) that issued the call, the parameters for the call, and if the call succeeded or failed. Receipts for everything. ๐-audit-interface (file | sysvmq)โ Specifies what audit interface to use. The"file"interface writes audit messages to the file passed to-auditlog. The"sysvmq"interface writes audit messages to a SYSV message (seemsgget(2)andmsgrcv(2)). The message queue the"sysvmq"interface writes to has the key"ftok(path, 1)", where"path"is the path specified in the-auditlogoption.
Defaults to "file".
-d <debug level>โ Sets the detail level for the debugging trace written to the/var/log/openafs/FileLogfile. Provide one of the following values, each of which produces an increasingly detailed trace:0,1,5,25, and125. The default value of0produces only a few messages. (So125is the "tell me everything, emotionally" setting. ๐ )-p <number of processes>โ Sets the number of threads to run. Provide a positive integer. The File Server creates and uses five threads for special purposes, in addition to the number specified (but if this argument specifies the maximum possible number, the File Server automatically uses five of the threads for its own purposes).
The maximum number of threads can differ in each release of OpenAFS. Consult the OpenAFS Release Notes for the current release.
-spare <number of spare blocks>โ Specifies the number of additional kilobytes an application can store in a volume after the quota is exceeded. Provide a positive integer; a value of0prevents the volume from ever exceeding its quota. Do not combine this argument with the-pctspareargument. ๐ซ-pctspare <percentage spare>โ Specifies the amount by which the File Server allows a volume to exceed its quota, as a percentage of the quota. Provide an integer between0and99. A value of0prevents the volume from ever exceeding its quota. Do not combine this argument with the-spareargument. ๐ซ-b <buffers>โ Sets the number of directory buffers. Provide a positive integer.-l <large vnodes>โ Sets the number of large vnodes available in memory for caching directory elements. Provide a positive integer.-s <small nodes>โ Sets the number of small vnodes available in memory for caching file elements. Provide a positive integer.-vc <volume cachesize>โ Sets the number of volumes the File Server can cache in memory. Provide a positive integer.-w <call back wait interval>โ Sets the interval at which the daemon spawned by the File Server performs its maintenance tasks. Do not use this argument; changing the default value can cause unpredictable behavior. (We said it in CAUTIONS and we're saying it again. It's giving "warning label for a reason." ๐)-cb <number of callbacks>โ Sets the number of callbacks the File Server can track. Provide a positive integer.-bannerโ Prints the following banner to/dev/consoleabout every10minutes.
File Server is running at I<time>.
-novbcโ Prevents the File Server from breaking the callbacks that Cache Managers hold on a volume that the File Server is reattaching after the volume was offline (as a result of thevos restorecommand, for example). Use of this flag is strongly discouraged. ๐ญ-nobusyโ This option slightly changes the error codes reported to clients when an unattached volume is accessed by a client during fileserver startup.
Normally, non-DAFS fileservers start accepting requests immediately on startup, but attachment of volumes can take a while. So if a client tries to access a volume that is not attached simply because the fileserver hasn't attached it yet, that client will get an error. With the -nobusy option present, the fileserver will immediately respond with an error code that indicates the server is starting up. However, some older clients (before OpenAFS 1.0) don't understand this error code, and may not function optimally. So the default behavior, without the -nobusy option, is to at first respond with a different error code that is understood by more clients, but is indistinguishable from other scenarios where the volume is busy and not attached for other reasons.
There is usually no reason to use this option under normal operation. (Lowkey: don't.)
-implicit <admin mode bits>โ Defines the set of permissions granted by default to thesystem:administratorsgroup on the ACL of every directory in a volume stored on the file server machine. Provide one or more of the standard permission letters ("rlidwka") and auxiliary permission letters ("ABCDEFGH"), or one of the shorthand notations for groups of permissions ("all","none","read", and"write"). To review the meaning of the permissions, see thefs setaclreference page.-readonlyโ Don't allow writes to this fileserver. ๐-admin-writeโ Allows write requests for members ofsystem:administratorson the read-only fileserver in question. The"-admin-write"option has no effect when the"-readonly"is not specified. (i.e. it's the plus-one of-readonly, it can't show up alone. ๐ฏ)-hr <number of hours between refreshing the host cps>โ Specifies how often the File Server refreshes its knowledge of the machines that belong to protection groups (refreshes the host CPSs for machines). The File Server must update this information to enable users from machines recently added to protection groups to access data for which those machines now have the necessary ACL permissions.-busyat <redirect clients when queue > n>โ Defines the number of incoming RPCs that can be waiting for a response from the File Server before the File Server returns the error code"VBUSY"to the Cache Manager that sent the latest RPC. In response, the Cache Manager retransmits the RPC after a delay. This argument prevents the accumulation of so many waiting RPCs that the File Server can never process them all. Provide a positive integer. The default value is600.-rxpck <number of rx extra packets>โ Controls the number of Rx packets the File Server uses to store data for incoming RPCs that it is currently handling, that are waiting for a response, and for replies that are not yet complete. Provide a positive integer.-rxdbgโ Writes a trace of the File Server's operations on Rx packets to the file/var/log/openafs/rx_dbg.-rxdbgeโ Writes a trace of the File Server's operations on Rx events (such as retransmissions) to the file/var/log/openafs/rx_dbg.-rxmaxmtu <bytes>โ Defines the maximum size of an MTU. The value must be between the minimum and maximum packet data sizes for Rx.-jumboโ Allows the server to send and receive jumbograms. A jumbogram is a large-size packet composed of2to4normal Rx data packets that share the same header. The fileserver does not use jumbograms by default, as some routers are not capable of properly breaking the jumbogram into smaller packets and reassembling them. (Routers said "not today." ๐ค)-nojumboโ Deprecated; jumbograms are disabled by default.-rxbindโ Force the fileserver to only bind to one IP address.-allow-dotted-principalsโ By default, the RXKAD security layer will disallow access by Kerberos principals with a dot in the first component of their name. This is to avoid the confusion where principalsuser/adminanduser.adminare both mapped to theuser.adminPTS entry. Sites whose Kerberos realms don't have these collisions between principal names may disable this check by starting the server with this option.-Lโ Sets values for many arguments in a manner suitable for a large file server machine. Combine this flag with any option except the-Sflag; omit both flags to set values suitable for a medium-sized file server machine.-Sโ Sets values for many arguments in a manner suitable for a small file server machine. Combine this flag with any option except the-Lflag; omit both flags to set values suitable for a medium-sized file server machine.
And that's the options, bestie. Still more to come โ don't go anywhere. ๐ฆ
-realm<Kerberos realm name> โ okay so this one sets the Kerberos realm name for the File Server to use. If you don't hand it one, it uses the realm name that corresponds to the cell listed in the local/etc/openafs/server/ThisCellfile. โจ-udpsize<size of socket buffer in bytes> โ sets the size of the UDP buffer, which is64 KBby default. Give it a positive integer, preferably larger than the default. ๐-sendsize<size of send buffer in bytes> โ sets the size of the send buffer, which is16384bytes by default. ๐-abortthreshold<abort threshold> โ sets the abort threshold, which gets triggered when an AFS client sends a bunch of FetchStatus requests in a row and all of them fail because of access control or some other error. Once the abort threshold is reached, the file server starts slowing down responses to that problem client to reduce the load on the file server. ๐ฎโ๐จ
The throttling behaviour can cause issues especially for some versions of the Windows OpenAFS client. When you're using Windows Explorer to navigate the AFS directory tree, directories with only "look" access for the current user may load more slowly because of the throttling. That's because the Windows OpenAFS client sends FetchStatus calls one at a time instead of in bulk like the Unix OpenAFS client does. ๐
Setting the threshold to 0 disables the throttling behavior. This option is available in OpenAFS versions 1.4.1 and later. ๐ฅ
-enable_peer_statsโ activates the collection of Rx statistics and allocates memory for their storage. For each connection with a specific UDP port on another machine, a separate record is kept for each type of RPC (FetchFile, GetStatus, and so on) sent or received. To display or otherwise access the records, use the Rx Monitoring API. ๐-enable_process_statsโ also activates the collection of Rx statistics and allocates memory for their storage. A separate record is kept for each type of RPC (FetchFile, GetStatus, and so on) sent or received, aggregated over all connections to other machines. To display or otherwise access the records, use the Rx Monitoring API. ๐-syslog[<loglevel>] โ use syslog instead of the normal logging location for the fileserver process. If provided, log messages are at <loglevel> instead of the defaultLOG_USER. ๐ชต-mrafslogsโ use MR-AFS (Multi-Resident) style logging. This option is deprecated. ๐-transarc-logsโ use Transarc style logging features. Rename the existing log file/var/log/openafs/FileLogto/var/log/openafs/FileLog.oldwhen the fileserver is restarted. This option is provided for compatibility with older versions. ๐ฐ๏ธ-saneaclsโ offer the SANEACLS capability for the fileserver. This option is currently unimplemented. ๐
-item -cve-2018-7168-enforce
To address CVE-2018-7168 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7168 disable fileserver opcode RXAFS_StoreACL (134). This opcode was replaced with RXAFS_StoreACL (164). The opcode 164 is always available; this option serves only to disable the old opcode 134, for which client intent is unreliable. ๐ก๏ธ
-helpโ prints the online help for this command. All other valid options are ignored. ๐-vhandle-setaside<fds reserved for non-cache io> โ number of file handles set aside for I/O not in the cache. Defaults to128. ๐๏ธ-vhandle-max-cachesize<max open files> โ maximum number of available file handles. ๐ฆ-vhandle-initial-cachesize<initial open file cache> โ number of file handles set aside for I/O in the cache. Defaults to128. ๐งบ-vattachpar<number of volume attach threads> โ the number of threads assigned to attach and detach volumes. The default is1. โ ๏ธ Warning: many of the I/O parallelism features of Demand-Attach Fileserver are turned off when the number of volume attach threads is only1.
This option is only meaningful for a file server built with pthreads support. ๐งต
-m<min percentage spare in partition> โ specifies the percentage of each AFS server partition that the AIX version of the File Server creates as a reserve. Specify an integer value between0and30; the default is8%. A value of0means that the partition can become completely full, which can have serious negative consequences. This option is not supported on platforms other than AIX. ๐จ-lockโ prevents any portion of the fileserver binary from being paged (swapped) out of memory on a file server machine running the IRIX operating system. This option is not supported on platforms other than IRIX. ๐-offline-timeout<timeout in seconds> โ setting this option toNmeans that if any clients are reading from a volume when we want to offline that volume (for example, as part of releasing a volume), we will waitNseconds for the clients' request to finish. If the clients' requests have not finished, we will then interrupt the client requests and send an error to those clients, allowing the volume to go offline.
If a client is interrupted, from the client's point of view, it will appear as if they had accessed the volume after it had gone offline. For RO volumes, this means the client should fail-over to other valid RO sites for that volume. This option may speed up volume releases if volumes are being accessed by clients that have slow or unreliable network connections.
Setting this option to 0 means to interrupt clients immediately if a volume is waiting to go offline. Setting this option to -1 means to wait forever for client requests to finish. The default value is -1. โณ
-offline-shutdown-timeout<timeout in seconds> โ this option behaves similarly to-offline-timeoutbut applies to volumes that are going offline as part of the fileserver shutdown process. If the value specified isN, we will interrupt any clients reading from volumes afterNseconds have passed since we first needed to wait for a volume to offline during the shutdown process.
Setting this option to 0 means to interrupt all clients reading from volumes immediately during the shutdown process. Setting this option to -1 means to wait forever for client requests to finish during the shutdown process.
If -offline-timeout is specified, the default value of -offline-shutdown-timeout is the value specified for -offline-timeout. Otherwise, the default value is -1. ๐
-sync<always | onclose | none> โ this option changes how hard the fileserver tries to ensure that data written to volumes actually hits the physical disk. ๐พ
Normally, when the fileserver writes to disk, the underlying filesystem or Operating System may delay writes from actually going to disk, and reorder which writes hit the disk first. So, during an unclean shutdown of the machine (if the power goes out, or the machine crashes, etc), file data may become lost that the server previously told clients was already successfully written.
To try to mitigate this, the fileserver will try to "sync" file data to the physical disk at numerous points during various I/O. However, this can result in significantly reduced performance. Depending on the usage patterns, this may or may not be acceptable. This option dictates specifically what the fileserver does when it wants to perform a "sync".
There are several options; pass one of these as the argument to -sync. The default is "onclose".
alwaysโ this causes a sync operation to always sync immediately and synchronously. This is the slowest option that provides the greatest protection against data loss in the event of a crash. ๐ค
Note that this is still not a 100% guarantee that data will not be lost or corrupted during a crash. The underlying filesystem itself may cause data to be lost or corrupt in such a situation. And OpenAFS itself does not (yet) even guarantee that all data is consistent at any point in time; so even if the filesystem and OS do not buffer or reorder any writes, you are not guaranteed that all data will be okay after a crash. ๐ญ
This was the only behavior allowed in OpenAFS releases prior to 1.4.5.
oncloseโ this causes a sync to do nothing immediately, but causes the relevant file to be flagged as potentially needing a sync. When a volume is detached, volume metadata files flagged for synced are synced, as well as data files that have been accessed recently. Events that cause a volume to detach include: performing volume operations (dump, restore, clone, etc), a clean shutdown of the fileserver, or during DAFS "soft detachment". ๐งน
Effectively this option is the same as "never" while a volume is attached and actively being used, but if a volume is detached, there is an additional guarantee for the data's consistency.
After the removal of the "delayed" option after the OpenAFS 1.6 series, this option became the default.
neverโ this causes all syncs to never do anything. This is the fastest option, with the weakest guarantees for data consistency. ๐โโ๏ธ
Depending on the underlying filesystem and Operating System, there may be guarantees that any data written to disk will hit the physical media after a certain amount of time. For example, Linux's pdflush process usually makes this guarantee, and ext3 can make certain various consistency guarantees according to the options given. ZFS on Solaris can also provide similar guarantees, as can various other platforms and filesystems. Consult the documentation for your platform if you are unsure. ๐
delayedโ this option used to exist in OpenAFS1.6, but was later removed due to issues encountered with data corruption during normal operation. Outside of the OpenAFS1.6series, it is not a valid option, and the fileserver will fail to start if you specify this (or any other unknown option). It caused syncs to occur in a background thread, executing every10seconds. ๐ง
This was the only behavior allowed in OpenAFS releases starting from 1.4.5 up to and including 1.6.2. It was also the default for the 1.6 series starting in OpenAFS 1.6.3.
Okay so โ real talk โ which option you pick is not an easy decision to make. ๐ Different developers and experts sometimes straight-up disagree on which one is the most reasonable, and ngl it may depend on the specific scenario and workload involved. Some argue that the "always" option does not provide significantly greater guarantees over any other option, whereas others argue that choosing anything besides the "always" option allows for an unacceptable risk of data loss. It may depend on your usage patterns, your platform and filesystem, and, honestly, who you talk to about this topic. Soโฆ vibe check your own setup bestie, that's the move. ๐ซถ
-logfile <log file>โ Sets the file to use for server logging. If logfile is not specified and no other logging options are supplied, this will be/var/log/openafs/FileLog. ๐ Heads up though: this option is intended for debugging and testing purposes โ changing the location of the log file from the command line may result in undesirable interactions with tools such asbos.-vhashsize <sizeโ Thelog(2)of the number of volume hash buckets. Default is8(i.e., by default, there are 2^8 = 256 volume hash buckets). The minimum that can be specified is6(64 hash buckets). In OpenAFS 1.5.77 and earlier, the maximum that can be specified is14(16384 buckets). After 1.5.77, the maximum that can be specified is28(268435456 buckets). ๐๏ธโจ-config <configuration directory>โ Set the location of the configuration directory used to configure this service. In a typical configuration this will be/etc/openafs/serverโ this option allows the use of alternative configuration locations for testing purposes. ๐งช
๐ EXAMPLES ๐
The following bos create command creates a traditional fs process on the file server machine "fs2.example.com" that uses the large configuration size, and allows volumes to exceed their quota by 10%. Type the command on a single line:
% bos create -server fs2.example.com -instance fs -type fs \
-cmd "/usr/lib/openafs/fileserver -pctspare 10 -L" \
/usr/lib/openafs/volserver /usr/lib/openafs/salvager
๐ TROUBLESHOOTING ๐
Sending process signals to the File Server Process can change its behavior in the following ways:
- File Server +
XCPUon Unix โ Prints a list of client IP Addresses. - File Server +
USR2on Windows โ Prints a list of client IP Addresses. - File Server +
POLLon HPUX โ Prints a list of client IP Addresses. - Any server +
TSTPon Any โ Increases Debug level by a power of 5 โ 1,5,25,125, etc. This has the same effect as the-d XXXcommand-line option. - Any Server +
HUPon Any โ Resets Debug level to 0. - File Server +
TERMon Any โ Run minor instrumentation over the list of descriptors. - Other Servers +
TERMon Any โ Causes the process to quit. - File Server +
QUITon Any โ Causes the File Server to Quit. Bos Server knows this. ๐
The basic metric of whether an AFS file server is doing well is the number of connections waiting for a thread, which can be found by running the following command:
% rxdebug <server> | grep waiting_for | wc -l
Each line returned by "rxdebug" that contains the text "waiting_for" represents a connection that's waiting for a file server thread.
If the blocked connection count is ever above 0, the server is having problems replying to clients in a timely fashion. ๐ญ If it gets above 10, roughly, there will be noticeable slowness by the user. The total number of connections is a mostly irrelevant number that goes essentially monotonically for as long as the server has been running and then goes back down to zero when it's restarted. ๐๐
The most common cause of blocked connections rising on a server is some process somewhere performing an abnormal number of accesses to that server and its volumes. If multiple servers have a blocked connection count, the most likely explanation is that there is a volume replicated between those servers that is absorbing an abnormally high access rate. ๐
To get an access count on all the volumes on a server, run:
% vos listvol <server> -long
and save the output in a file. The results will look like a bunch of vos examine output for each volume on the server. Look for lines like:
40065 accesses in the past day (i.e., vnode references)
and look for volumes with an abnormally high number of accesses. Anything over 10,000 is fairly high, but some volumes like root.cell and other volumes close to the root of the cell will have that many hits routinely. Anything over 100,000 is generally abnormally high. The count resets about once a day. โฐ
Another approach that can be used to narrow the possibilities for a replicated volume, when multiple servers are having trouble, is to find all replicated volumes for that server. Run:
% vos listvldb -server <server>
where <server> is one of the servers having problems to refresh the VLDB cache, and then run:
% vos listvldb -server <server> -part <partition>
to get a list of all volumes on that server and partition, including every other server with replicas.
Once the volume causing the problem has been identified, the best way to deal with the problem is to move that volume to another server with a low load or to stop any runaway programs that are accessing that volume unnecessarily. Often the volume will be enough information to tell what's going on. ๐ต๏ธโโ๏ธ
If you still need additional information about who's hitting that server, sometimes you can guess at that information from the failed callbacks in the FileLog log in /var/log/afs on the server, or from the output of:
% /usr/afsws/etc/rxdebug <server> -rxstats
but the best way is to turn on debugging output from the file server. (Warning: This generates a lot of output into FileLog on the AFS server.) โ ๏ธ To do this, log on to the AFS server, find the PID of the fileserver process, and do:
kill -TSTP <pid>
where <pid> is the PID of the file server process. This will raise the debugging level so that you'll start seeing what people are actually doing on the server. You can do this up to three more times to get even more output if needed. To reset the debugging level back to normal, use (The following command will NOT terminate the file server):
kill -HUP <pid>
The debugging setting on the File Server should be reset back to normal when debugging is no longer needed. Otherwise, the AFS server may well fill its disks with debugging output. ๐ซ
The lines of the debugging output that are most useful for debugging load problems are:
SAFS_FetchStatus, Fid = 2003828163.77154.82248, Host 171.64.15.76
SRXAFS_FetchData, Fid = 2003828163.77154.82248
(The example above is partly truncated to highlight the interesting information). The Fid identifies the volume and inode within the volume; the volume is the first long number. So, for example, this was:
% vos examine 2003828163
pubsw.matlab61 2003828163 RW 1040060 K On-line
afssvr5.Stanford.EDU /vicepa
RWrite 2003828163 ROnly 2003828164 Backup 2003828165
MaxQuota 3000000 K
Creation Mon Aug 6 16:40:55 2001
Last Update Tue Jul 30 19:00:25 2002
86181 accesses in the past day (i.e., vnode references)
RWrite: 2003828163 ROnly: 2003828164 Backup: 2003828165
number of sites -> 3
server afssvr5.Stanford.EDU partition /vicepa RW Site
server afssvr11.Stanford.EDU partition /vicepd RO Site
server afssvr5.Stanford.EDU partition /vicepa RO Site
and from the Host information one can tell what system is accessing that volume. ๐
Note that the output of vos_examine(1) also includes the access count, so once the problem has been identified, vos examine can be used to see if the access count is still increasing. Also remember that you can run vos examine on the read-only replica (e.g., pubsw.matlab61.readonly) to see the access counts on the read-only replica on all of the servers that it's located on. ๐
๐ PRIVILEGE REQUIRED ๐
The issuer must be logged in as the superuser "root" on a file server machine to issue the command at a command shell prompt. It is conventional instead to create and start the process by issuing the bos create command.
๐ SEE ALSO ๐
BosConfig(5), FileLog(5), bos_create(8), bos_getlog(8), fs_setacl(1), msgget(2), msgrcv(2), salvager(8), volserver(8), vos_examine(1)
๐ COPYRIGHT ๐
IBM Corporation 2000. http://www.ibm.com/ All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
And that's the whole page bestie!! ๐ This was OpenAFS, page FILESERVER(8), dated 2026-07-27 โ go forth and serve files iconically, you absolute main character. โจ๐๐ฆ
๐ฆ where this page comes from
- ubuntu stonking: openafs-fileserver 1.8.16.1-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms