=head1 NAME
-afsd - Initializes the Cache Manager and starts related daemons
+afsd, afsd.fuse - Initializes the Cache Manager and starts related daemons
=head1 SYNOPSIS
S<<< [B<-confdir> <I<configuration directory>>] >>>
S<<< [B<-daemons> <I<number of daemons to use>>] >>>
S<<< [B<-dcache> <I<number of dcache entries>>] >>> [B<-debug>]
- [B<-dynroot>] [B<-enable_peer_stats>] [B<-enable_process_stats>]
- [B<-fakestat>] [B<-fakestat-all>]
+ [B<-dynroot>] [B<-dynroot-sparse>] [B<-enable_peer_stats>]
+ [B<-enable_process_stats>] [B<-fakestat>] [B<-fakestat-all>]
S<<< [B<-files> <I<files in cache>>] >>>
S<<< [B<-files_per_subdir> <I<log(2) of files per dir>> ] >>>
[B<-help>] S<<< [B<-logfile> <I<Place to keep the CM log>>] >>>
+ S<<< [B<-inumcalc>] <I<method>> >>>
[B<-mem_alloc_sleep>] [B<-memcache>]
S<<< [B<-mountdir> <I<mount location>>] >>> [B<-nomount>]
[B<-nosettime>]
S<<< [B<-prealloc> <I<number of 'small' preallocated blocks>>] >>>
[B<-rmtsys>] S<<< [B<-rootvol> <I<name of AFS root volume>>] >>>
- [B<-rxbind>] S<<< [B<-rxpck> value for rx_extraPackets ] >>>
+ [B<-rxbind>] S<<< [B<-rxmaxmtu> value for maximum MTU ] >>>
+ S<<< [B<-rxpck> value for rx_extraPackets ] >>>
[B<-settime>] [B<-shutdown>]
S<<< [B<-splitcache> <I<RW/RO ratio>>] >>>
S<<< [B<-stat> <I<number of stat entries>>] >>> [B<-verbose>]
+ [B<-disable-dynamic-vcaches>]
S<<< [B<-volumes> <I<number of volume entries>>] >>>
- [B<-waitclose>]
+ [B<-waitclose>] [B<-rxmaxfrags> <I<max # of fragments>>]
+ S<<< [B<-volume-ttl> <I<vldb cache timeout>>] >>>
=for html
</div>
The B<afsd> command initializes the Cache Manager on an AFS client machine
by transferring AFS-related configuration information into kernel memory
-and starting several daemons. More specifically, the B<afsd> command
-performs the following actions:
+and starting several daemons. B<afsd.fuse> is an experimental variant that
+initializes a FUSE-based Cache Manager instead of one based on a kernel
+module.
+
+The B<afsd> command performs the following actions:
=over 4
By default, the list of database server machines is transferred into the
kernel from the F</usr/vice/etc/CellServDB> file. Alternatively, when the
B<-afsdb> option is used, the list of database server machines is taken
-from the AFSDB DNS records for each cell. After initialization, use the
+from the DNS SRV or AFSDB records for each cell. After initialization, use the
B<fs newcell> command to change the kernel-resident list without having to
reboot.
data that the Cache Manager requests at a time from the File Server (how
much data per fetch RPC, since AFS uses partial file transfer).
-For a disk cache, a chunk is a F<VI<n>> file and this parameter
-sets the maximum size to which each one can expand; the default is 64
-KB. For a memory cache, each chunk is a collection of contiguous memory
-blocks; the default is size is 8 KB.
+For a disk cache, a chunk is a F<VI<n>> file and this parameter sets the
+maximum size to which each one can expand. For a memory cache, each chunk
+is a collection of contiguous memory blocks. The default for a disk cache
+is between 256 KB and 1 MB depending on the size of the cache. The default
+for a memory cache is 8 KB.
To override the default chunk size for either type of cache, use the
B<-chunksize> argument to provide an integer to be used as an exponent of
-two; see L<OPTIONS> for details. For a memory cache, if total cache size
+two; see L</OPTIONS> for details. For a memory cache, if total cache size
divided by chunk size leaves a remainder, the B<afsd> program rounds down
the number of dcache entries, resulting in a slightly smaller cache.
=item *
Sets the number of I<stat> entries available in machine memory for caching
-status information about cached AFS files. The default is 300; use the
-B<-stat> argument to override the default.
-
-=item *
-
-If the B<-settime> option is specified, then it randomly selects a file
-server machine in the local cell as the source for the correct time. Every
-five minutes thereafter, the local clock is adjusted (if necessary) to
-match the file server machine's clock. This is not enabled by default. It
-is recommended, instead, that the Network Time Protocol Daemon be used to
-synchronize the time.
+status information about cached AFS files. The default is based on the
+size of the cache. Use the B<-stat> argument to override the default.
=back
=item *
One I<server connection> daemon, which sends a probe to the File
-Server every few minutes to check that it is still accessible. If the
-B<-settime> option is set, it also synchronizes the machine's clock
-with the clock on a randomly-chosen file server machine. There is
-always one server connection daemon.
+Server every few minutes to check that it is still accessible.
=item *
=back
+B<afsd.fuse> is a variant of B<afsd> that, instead of initializing a Cache
+Manager implemented as a kernel module, initializes a FUSE-based AFS
+client. FUSE (Filesystem in USErspace) is a Linux-only mechanism for
+providing a file system through a purely user-space daemon without a
+kernel module component. B<afsd.fuse> takes all of the same options as
+B<afsd>.
+
This command does not use the syntax conventions of the AFS command
suites. Provide the command name and all option names in full.
reserved 7006/udp (for future use)
bosserver 7007/udp
-Additionally, for B<klog> to work through the firewall you need to allow
+Clients will also need to be able to contact your Kerberos KDC to
+authenticate. If you are using B<kaserver> and B<klog>, you need to allow
inbound and outbound UDP on ports >1024 (probably 1024<port<2048 would
suffice depending on the number of simultaneous B<klog>s).
Be sure to set the UDP timeouts on the firewall to be at least twenty
minutes for the best callback performance.
+B<afsd.fuse> was first introduced in OpenAFS 1.5.74. It is only available
+if OpenAFS was built with the C<--enable-fuse-client> configure switch.
+It should be considered experimental.
+
=head1 OPTIONS
=over 4
=item B<-afsdb>
-Enable afsdb support. This will use DNS to lookup the AFSDB record and use
-that for the database servers for each cell instead of the values in the
-F<CellServDB> file. This has the advantage of only needing to update one
-DNS record to reconfigure the AFS clients for a new database server as
-opposed to touching all of the clients, and also allows one to access a
-cell without preconfiguring its database servers in F<CellServDB>.
+Enable afsdb support. This will use DNS to lookup the SRV or AFSDB records and
+use that for the database servers for each cell instead of the values
+in the F<CellServDB> file. This has the advantage of only needing to
+update one set of DNS records to reconfigure the AFS clients for a new
+database server as opposed to touching all of the clients, and also
+allows one to access a cell without preconfiguring its database
+servers in F<CellServDB>. The format of SRV records is defined in
+RFC 5864, and the AFSDB record format is in RFC 1183.
=item B<-backuptree>
=item B<-chunksize> <I<chunk size>>
Sets the size of each cache chunk. The integer provided, which must be
-from the range C<0> to C<30>, is used as an exponent on the number 2. It
-overrides the default of 16 for a disk cache (2^16 is 64 KB) and 13 for a
-memory cache (2^13 is 8 KB). A value of C<0> or less, or greater than
+from the range C<0> to C<30>, is used as an exponent on the number 2. If not
+supplied, a default chunksize will be determined based on the cache type and
+cache size, and will range from C<13> (8KB) for memory cache and C<18> to
+C<20> (256 KB to 1MB) for disk cache. A value of C<0> or less, or greater than
C<30>, sets chunk size to the appropriate default. Values less than C<10>
(which sets chunk size to a 1 KB) are not recommended. Combining this
argument with the B<-dcache> argument is not recommended because it
which provides equivalent functionality to the most commonly used symbolic
links.
+When the dynamic root (B<-dynroot>, B<-dynroot-sparse>) and the fake stat
+(B<-fakestat>, B<-fakestat-all>) modes are in effect, the cache manager
+provides a special directory named F</afs/.:mount> which allows access to
+volumes by volume name or ID. The F</afs/.:mount> directory appears to be
+empty, but any name in the form of I<cell>:I<volume> will be resolved as a
+read-write mount point to the specified volume. For example, the
+I<user.jdoe> volume in the I<example.com> cell would be accessible at the
+following path: F</afs/.:mount/example.com:user.jdoe>. This dynamic mount
+feature is recommended only for temporary access to a volume. Linux-based
+cache managers provide this dynamic mount feature even when dynamic root
+(B<-dynroot>, B<-dynroot-sparse>) is not in effect.
+
+=item B<-dynroot-sparse>
+
+In addition to operating in the manner described for dynroot above,
+cells other than the local cell are not shown by default until a lookup
+occurs. Cell aliases as set in the CellAliases file are shown as normal,
+although they may appear to be dangling links until traversed.
+
=item B<-enable_peer_stats>
Activates the collection of Rx statistics and allocates memory for their
Finder program doesn't try to contact every AFS cell the system knows
about.
+Note that, for the purposes of B<-fakestat>, local cellular mounts count
+as "cross-cell" mounts. That is, if the local cell is C<localcell>, a
+mount for C<localcell:root.cell> will count as a "cross-cell" mount and
+so stat calls for it will be faked with B<-fakestat>. In practice, local
+cellular mounts are rare and generally discouraged, so this should not
+generally make a difference.
+
=item B<-fakestat-all>
Return fake values for stat calls on all mounts, not just cross-cell
Specifies the number of F<VI<n>> files to create in the cache directory
for a disk cache, overriding the default that is calculated as described
-in L<DESCRIPTION>. Each F<VI<n>> file accommodates a chunk of data, and
+in L</DESCRIPTION>. Each F<VI<n>> file accommodates a chunk of data, and
can grow to a maximum size of 64 KB by default. Do not combine this
argument with the B<-memcache> argument.
This option is obsolete and no longer has any effect.
+=item B<-inumcalc> <I<method>>
+
+Specifies the method used by the Cache Manager to generate inode numbers for
+files, directories, and symlinks in the AFS filesystem. Valid methods are
+C<compat> and C<md5>. The default method is C<compat>.
+
+When the C<compat> method is in effect, the Cache Manager generates inode
+numbers for a given inode by multiplying the AFS volume number by 65536, adding
+the result to the AFS vnode number, and finally truncating the result to a
+signed 32 bit integer.
+
+When the C<md5> method is in effect, the Cache Manager generates inode numbers
+for a given inode by calculating the MD5 digest of a combination of the cell
+number, volume number, and vnode number. The result is truncated to a signed 32
+bit integer. The C<md5> method is computationally more expensive but greatly
+reduces the chance for inode number collisions, especially when volumes from
+multiple cells are mounted within the AFS filesystem.
+
=item B<-mem_alloc_sleep>
-Allows sleeps when allocating a memory cache.
+This option is obsolete and no longer has any effect.
=item B<-memcache>
=item B<-nosettime>
-This is enabled by default. It prevents the Cache Manager from
-synchronizing its clock with the clock on a server machine selected at
-random by checking the time on the server machine every five minutes.
-This is the recommended behavior; instead of the AFS Cache Manager, the
-Network Time Protocol Daemon should be used to synchronize the system
-time.
+This option is obsolete and no longer has any effect. The operating system
+provided time keeping daemons should be used to maintain the system time.
=item B<-prealloc> <I<number of preallocated blocks>>
Bind the Rx socket (one interface only).
+=item B<-rxmaxfrags> <I<max # of fragments>>
+
+Set a limit for the maximum number of UDP fragments Rx will send per Rx
+packet, and the maximum number of fragments Rx thinks it can receive when
+advertising its receive size to peers. Practically speaking, setting this
+option means that you will not see Rx data packets that are broken into more
+than N fragments, where N is the value specified for this option. Setting this
+option to 1 effectively prevents fragmentation, and can be useful when dealing
+with networking equipment that does not properly handle UDP fragments.
+
+Note that this option just specifies a maximum. The actual number of fragments
+seen on the wire may be less than what is specified, depending on the
+configuration of the peer.
+
+=item B<-rxmaxmtu> <I<value for maximum MTU>>
+
+Set a limit for the largest maximum transfer unit (network packet size) that
+the AFS client on this machine will be willing to transmit. This switch can
+be used where an artificial limit on the network precludes packets as large
+as the discoverable MTU from being transmitted successfully.
+
=item B<-rxpck> <I<value for rx_extraPackets>>
-Set rx_extraPackets to this value.
+Set rx_extraPackets to this value. This sets the number of extra Rx
+packet structures that are available to handle Rx connections. This
+value should be increased if the "rxdebug 127.0.0.1 -port 7001
+-rxstats" command shows no free Rx packets. Increasing this value may
+improve OpenAFS client performance in some circumstances.
=item B<-settime>
-Enable native AFS time synchronization. This option is the opposite of
-B<-nosettime> and cannot be used with the B<-nosettime> option.
+This option is obsolete and no longer has any effect. The operating system
+provided time keeping daemons should be used to maintain the system time.
=item B<-shutdown>
=item B<-stat> <I<number of stat entries>>
Specifies the number of entries to allocate in the machine's memory for
-recording status information about the AFS files in the cache. This value
-overrides the default of C<300>.
+recording status information about the AFS files in the cache. If this value
+is not specified, the number of stat entires will be autotuned based on the
+size of the disk cache.
=item B<-verbose>
=item B<-volumes> <I<number of volume entries>>
Specifies the number of memory structures to allocate for storing volume
-location information. The default value is C<50>.
+location information. The default value is C<200>.
+
+=item B<-disable-dynamic-vcaches>
+
+By default, dynamic vcache overrides the B<-stat> option by using the value of
+B<-stat> (or the default) as the initial size of the stat (or vcache) pool and
+increases the pool dynamically as needed on supported platforms. This flag will
+disable this new functionality and honor the '-stat' setting.
=item B<-waitclose>
writes to the File Server, is now the default behavior. To perform
asynchronous writes in certain cases, use the B<fs storebehind> command.
+=item B<-volume-ttl>
+
+Specifies the maximum amount of time the Cache Manager will cache volume
+information retrieved from VL Servers.
+
+By default, the Cache Manager will cache read-only volume information as long
+as a volume callback is held for that volume. The callback may be held as long
+as files in the read-only volume are being accessed, with no upper limit. For
+read/write volumes, by default the Cache Manager will cache volume information
+forever, until a fileserver returns a volume-level error in response to
+accessing files in that volume.
+
+Use the B<-volume-ttl> option to specify the maximum amount of time in seconds
+that volume information will be cached, regardless of connectivity to the
+fileservers. Lowering this value can make the Cache Manager recover more
+quickly from certain volume/fileserver errors, but will increase the load on
+the VL Servers for contacted cells.
+
+A typical value is 7200 seconds (2 hours), which is the same as the default
+callback duration for read-only volumes. The minimum valid value is 600 seconds
+(10 minutes).
+
=back
=head1 EXAMPLES
L<CellServDB(5)>,
L<cacheinfo(5)>
+RFC 5864 L<http://www.ietf.org/rfc/rfc5864.txt>
+RFC 1183 L<http://www.ietf.org/rfc/rfc1183.txt>
+
=head1 COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.