dfsd(8dfs)

Initializes the DFS Cache Manager and starts related daemons

Synopsis

dfsd [-blocks number_of_cache_blocks] [-files number_of_cache_files]

[-stat number_of_status_cache_entries] [-rootfileset root_fileset]

[-cachedir cache_directory] [-mountdir DFS_mount_directory]

[-rootcell root_cell] [-settime] [-mainprocs number_of_background_daemons]

[-tokenprocs number_of_token_daemons] [-ioprocs number_of_I/O_background_daemons]

[-memcache] [-dcache number_of_entries] [-chunksize chunk_exponent]

[-namecachesize number_of_name_cache_entries]

[-initiallocalprotectlevel level] [-minlocalprotectlevel level]

[-initialremoteprotectlevel level] [\-minremoteprotectlevel level]

[-verbose] [-debug] [-help]

Options

-blocks number_of_cache_blocks
Specifies the number of kilobytes to be made available for caching in the machine's cache directory (for a disk cache) or memory (for a memory cache). This value overrides the default, which must be specified in the third field of the dcelocal/etc/CacheInfo file. The unit of measurement for block size is always kilobytes.

A disk cache should not exceed 90% of the disk space available on the cache partition; a memory cache should not exceed 20 to 25% of the machine's available memory. These limits are necessary because the implementation of the cache requires a small amount of disk space or machine memory, and because a memory cache must leave enough memory for processes and applications to run.

For a memory cache, do not combine this option with the -dcache option.

Note: The minimum cache size you can specify with the -blocks option is 17 kilobytes. If you specify a cache size smaller than 17 kilobytes, the Cache Manager creates a cache of 17 kilobytes.

-files number_of_cache_files
Specifies the number of V files (chunks) to be created in the cache directory for a disk cache. This value overrides the default, which is the number of cache blocks divided by 8.

Each V file can accommodate a chunk of data. By default, each chunk can accommodate 64 kilobytes of data. To operate most efficiently, at least 90% of the cache must be in use. Use the -files option to increase the number of V files if this is not the case. Do not specify a value greater than 32,000.

Do not combine this option with the -memcache option, which is used for memory caching.

Note: The minimum number of V files you can specify with the -files option is 2. If you specify a value smaller than 2, the Cache Manager creates a cache with two V files.

-stat number_of_status_cache_entries
Specifies the number of entries in the machine's memory for recording status information about DFS files in the cache. The default is 300.

-rootfileset root_fileset
Names the read/write fileset corresponding to the top-level (root) directory. This option is generally used for testing purposes only.

-cachedir cache_directory
Names the local disk directory to be used as the cache for disk caching. This value overrides the default, which must be specified in the second field of the CacheInfo file. The default is dcelocal/var/adm/dfs/cache.

Do not combine this option with the -memcache option, which is used for memory caching. With memory caching, the -cachedir option, like the second field of the CacheInfo file, is ignored.

-mountdir DFS_mount_directory
Names the local disk directory where the DCE global namespace is to be mounted. This value overrides the default, which must be specified in the first field of the CacheInfo file. The default for a machine with a disk is the global namespace designation (/...); if /... is not used, symbolic links to the global namespace will not work.

-rootcell root_cell
Names the cell that contains the root fileset. This option is generally used for testing purposes only.

-settime
Causes the local machine to select a random server machine in the local cell to use as the source of the correct time. If this option is specified, the local machine selects a server machine and checks the time on that machine every 10 minutes. If the time on the local machine differs by more than 2 seconds from the time on the selected server machine, the local machine adjusts its time to match that of the server machine.

For machines running the DCE Distributed Time Service (DTS) or the Network Time Protocol (NTP), it is recommended that the -settime option be omitted to prevent the machine from selecting and using two different time standards at once.

-mainprocs number_of_background_daemons
Specifies the number of background daemons to run on the machine. These daemons improve efficiency by performing prefetching and background writing of saved data. The default is two.

Increase the number of background daemons if the machine serves more than five users.

-tokenprocs number_of_token_daemons
Specifies the number of background daemons dedicated to servicing token revocation RPC requests from File Exporters. The default is two. (Token daemons run in addition to the background daemons associated with the -ainprocs option.)

Increase the number of token daemons if users on this machine interact with many File Server machines.

-ioprocs number_of_I/O_background_daemons
On a machine running the AIX operating system, specifies the number of background I/O daemons performing I/O operations. I/O daemons move data from disk to memory, and vice versa. The default is five.

On a machine running AIX, increase the number of I/O daemons if many users use the machine. Use this option only on a machine running AIX. Because no I/O daemons are used on a machine not running AIX, the option is ignored if it is used on a machine not running AIX.

-memcache
Causes dfsd to initialize a memory cache rather than a disk cache. If this option is provided, space in memory is allocated for the cache; no disk space is used, even if it is available.

Do not combine this option with the -files option (which is used for machines that use disk caching). Also, do not combine this option with the -cachedir option; with memory caching, the -cachedir option, like the second field of the CacheInfo file, is ignored.

-dcache number_of_entries
Sets the number of dcache entries in memory; dcache entries store information about cache chunks.

For a disk cache, the dcelocal/var/adm/dfs/cache/CacheItems file contains one entry for each V file. By default, 100 entries from the CacheItems file are duplicated in machine memory; the -dcache option overrides the default.

For a memory cache, there is no CacheItems file; one dcache entry exists for each cache chunk. The Cache Manager determines the number of dcache entries (cache chunks) by dividing the cache size by the chunk size; the -cache option sets the number of cache chunks. Do not combine this option with the -blocks option.

Use of this option with a disk cache is not necessary because it increases performance only marginally. It is not recommended with a memory cache because it requires the issuer to perform additional calculations.

-chunksize chunk_exponent
Sets the size of each cache chunk. Provide an integer between 13 and 18 to be used as an exponent of 2. This value overrides the default chunk size, which is 64 kilobytes (2\u\s-4\&16\s0\d) for a disk cache and 8 kilobytes (2\u\s-4\&13\s0\d) for a memory cache. A value less than 13 or greater than 18 sets the chunk size to the appropriate default for the type of cache in use. The unit of measure for chunk size is always bytes.

It is not recommended that you use this option with the -dcache option for a memory cache.

-namecachesize number_of_name_cache_entries
Sets the number of entries allocated for the Cache Manager's name lookup cache. Provide an integer greater than 0 (zero); the default number of name cache entries is 256.

The name lookup cache stores the results obtained from remote directory lookup requests to DFS servers, which allows subsequent lookup requests for the same file or directory to be satisfied on the local DFS client rather than on the remote DFS server. Because name cache entries are recycled when the name lookup cache limit is reached, the ability to satisfy the request locally depends upon the size of the name lookup cache.

-initiallocalprotectlevel level
Specifies the initial DCE RPC authentication level for communications between the Cache Manager and File Servers within the same cell. The level is set either as an integer value between 0 and 6, the complete string defining the authentication level, or an abbreviation of that string. For a description of the various DCE RPC levels, see the Description topic.

-minlocalprotectlevel level
Specifies the minimum acceptable DCE RPC authentication level for communications between the Cache Manager and File Servers within the same cell. The level is set either as an integer value between 0 and 6, the complete string defining the authentication level, or an abbreviation of that string. For a description of the various DCE RPC levels, see the Description topic.

-initialremoteprotectlevel level
Specifies the initial DCE RPC authentication level for communications between the Cache Manager and File Servers within foreign cells. The level is set either as an integer value between 0 and 6, the complete string defining the authentication level, or an abbreviation of that string. For a description of the various DCE RPC levels, see the Description topic.

-minremoteprotectlevel level
Specifies the minimum acceptable DCE RPC authentication level for communications between the Cache Manager and File Servers within foreign cells. The level is set either as an integer value between 0 and 6, the complete string defining the authentication level, or an abbreviation of that string. For a description of the various DCE RPC levels, see the Description topic.

-verbose
Directs dfsd to produce a more detailed trace of its activities than it does by default. The trace is displayed on standard output (stdout) unless it is directed elsewhere.

-debug
Causes dfsd to produce a highly detailed trace of its activities, which can be useful for debugging purposes. The trace is displayed on standard output (stdout) unless it is directed elsewhere.

-help
Prints the online help for this command. All other valid options specified with this option are ignored.

The help and apropos commands available with all command suites are also available with dfsd. See the bos help and bos apropos reference pages for examples using these commands.

Description

The dfsd process initializes the DFS Cache Manager on a client machine according to the information specified with the options described previously. It must be run on all DFS client machines. It is usually added to the proper start-up file (/etc/rc or its equivalent) rather than typed at the command shell prompt. (The dfsbind process must be run before the dfsd process in a start-up file.) The binary file for the dfsd process resides in dcelocal/bin/dfsd.

Specifically, the dfsd process does the following:

· Transfers information about cell membership to kernel memory. This information can be changed only by rebooting and running dfsd.

· Determines if the cache is on the local disk or in machine memory. A disk cache is used unless the -memcache option is provided. If the -memcache option is used, no disk space is used, even if it is available; the Cache Manager maintains all cached data and cache-related information in memory.

· Defines the name of the local disk directory devoted to a disk cache. The second field in the CacheInfo file specifies the default directory. If necessary, dfsd creates the directory, provided its parent directory exists. Any directory that formerly served as the disk cache is left on the disk.

· Sets the size of the cache. The third field in the CacheInfo file specifies the default cache size in kilobytes.

For a disk cache, the value in the CacheInfo file is an upper limit that can be increased only with the -blocks option; it cannot be increased with the other options available with the dfsd process. For a memory cache, the \-dcache option alone or in combination with the -chunksize option overrides the cache size specified in the CacheInfo file; these combinations are not recommended.

After initialization, use the cm setcachesize command to change the size of a disk cache without rebooting. The value set with the cm setcachesize command is overridden the next time the machine is rebooted and dfsd is run. The cm setcachesize command does not work for memory caches; the machine must be rebooted. (The cm etcachesize command can be used to display the current size of the cache, the amount in use, and the type of cache - disk or memory.)

· Sets the size of each chunk of data in the cache and, by implication, the amount of data the Cache Manager requests at one time from the File Exporter. For a memory cache, if the total cache size divided by the chunk size leaves a remainder, dfsd rounds the number down, resulting in a slightly smaller cache.

· Sets the number of dcache entries allocated in machine memory for storing information about the cache chunks in a disk cache.

· Sets the number of empty V files created in the cache directory for a disk cache. (A memory cache cannot use V files because it does not use disk storage; the number of chunks is instead equal to the number of dcache entries.)

· Sets the number of stat entries in machine memory for caching status information about cached DFS files.

· Sets the number of entries in the name lookup cache for storing the results of remote directory lookups.

· Specifies the directory on the machine's local disk where DFS is mounted. The first field in the CacheInfo file specifies the default directory.

· Selects a random server machine in the local cell as the source of the correct time if the -settime option is provided.

· Sets the initial RPC authentication level and minimum RPC authentication bound for communications between the Cache Manager and File Servers.

In addition to setting cache configuration parameters, dfsd also starts the following types of daemons. On most system types, these daemons appear as nameless entries in the output of the ps command.

· One or more maintenance daemons, which perform routine periodic maintenance tasks such as the following.

- Performing garbage collection

- Synchronizing files

- Probing processes on File Server machines every few minutes

- Refreshing information about filesets referenced by the Cache Manager once per hour

- Keeping the machine's clock synchronized with the clock of the chosen server machine (if the -settime option is included with the dfsd command)

· One or more background daemons, which improve performance by performing delayed writing of updated data. The default number of background daemons is two, which is usually sufficient to handle up to five simultaneous users of a machine. Use the -mainprocs option to increase the number of background daemons if the machine serves more than five users.

· One or more token daemons, which handle token revocation RPC requests from the File Exporters on File Server machines (for example, by writing modified data back to the File Server machines). The default number of token daemons is two. Use the -tokenprocs option to increase this number if the machine interacts with many File Server machines from different cells.

· On a machine running the AIX operating system, one or more I/O daemons, which move data from disk to memory and from memory to disk. The default number of I/O daemons is five. Use the -ioprocs option to increase the number of I/O daemons performing I/O requests if the number of users working on the machine increases and the machine begins to experience performance problems.

Use the -ioprocs option only on a machine running AIX. No I/O daemons are used on a machine not running AIX; the option is ignored if it is used on such a machine.

The default number of daemons is ten (one maintenance daemon, two background daemons, two token daemons, and five I/O daemons). You can alter only the number of background daemons, token daemons, and I/O daemons; dfsd initializes additional maintenance daemons as necessary.

RPC Security Settings

The dfsd command sets the DCE RPC security level for RPCs sent between a Cache Manager and DFS File Servers. The command sets two levels: an initial DCE RPC security level used as a starting point in security level negotiations between the Cache Manager and a File Server, and the minimum DCE RPC security level that the Cache Manager will accept for such communications. Two sets of these levels are maintained: One set specifies the security levels for communications with File Servers within the local cell, and the other set specifies the security levels for communications with File Servers within foreign cells. Both sets of security levels can be adjusted through the cm setprotectlevels command.

In operation, the Cache Manager and File Server interact to arrive at a mutually acceptable authentication level for communications. The negotiation starts with an RPC that uses the initial authentication level sent from the Cache Manager to the File Server. If the initial authentication level is outside the minimum or maximum bounds set at the File Server, the File Server returns a response to the Cache Manager specifying that the authentication level is either too low or too high. The Cache Manager then decreases or increases its authentication level accordingly and retries the RPC. This process continues until the Cache Manager either adjusts its RPCs to an acceptable security level or the File Server requests a security level below the minimum set at the Cache Manager (causing the Cache Manager to refuse communications with the File Server). Once the Cache Manager and File Server have negotiated a security level, the Cache Manager stores this information so that it does not need to renegotiate this level for further communications with the File Server.

The Cache Manager and fxd default settings are such that communications occur at the packet integrity authentication level.

In addition to a general pair of upper and lower bounds for all communications between the File Server and Cache Manager, administrators can also set advisory bounds on a per-fileset basis. At present, these advisory levels serve only to bias the Cache Manager's selection of an initial authentication level (they may be enforced in a future version of DFS). Advisory bounds are set through the fts setprotectlevels command and are stored in the FLDB record for that fileset.

Note that the use of this command does not preclude communications with File Servers running earlier versions of DFS.

The various authentication levels are set by specifying either an integer value between 0 and 6, a complete string specifying the authentication level, or an abbreviation of that string as the level argument for the various command options. The following lists the various authentication levels:

· rpc_protect_level_default or default or 0
Use the DCE default authentication level.

· rpc_protect_level_none or none or 1
Perform no authentication.

· rpc_protect_level_connect or connect or 2
Authenticate only when the Cache Manager establishes a connection with the File Server.

· rpc_protect_level_call or call or 3
Authenticate only at the beginning of each RPC received.

· rpc_protect_level_pkt or pkt or 4
Ensure that all data received is from the expected host.

· rpc_protect_level_pkt_integrity or pkt_integrity or 5
Authenticate and verify that none of the data transferred has been modified.

· rpc_protect_level_pkt_privacy or pkt_privacy or 6
Perform authentication as specified by all of the previous levels and also encrypt each RPC argument value.

Note that there is a trade-off between selecting higher security and performance. The higher levels of security require more overhead and increase the response time in file operations with File Servers.

Privileges Required

The issuer must be root on the local machine.

Examples

It is recommended that the dfsd process be included in the proper initialization file (/etc/rc or its equivalent) rather than typed at the command shell prompt. The dfsbind process must be run before the dfsd process in a start-up file. For most disk caches, the following form is appropriate in the initialization file:

dcelocal/bin/dfsd

The following line in an initialization file is appropriate when enabling a machine to serve more than five users:

dcelocal/bin/dfsd -mainprocs 4

The following line in an initialization file initializes a memory cache and sets the chunk size to 16 kilobytes (2\u\s-4\&14\s0\d):

dcelocal/bin/dfsd -memcache -chunksize 14

Related Information

Commands: cm getcachesize(8dfs)

cm getprotectlevels(8dfs)

cm setcachesize(8dfs)

cm setprotectlevels(8dfs)

dfsbind(8dfs)

fts setprotectlevels

Files: CacheInfo(4dfs)

CacheItems(4dfs)

FilesetItems(4dfs)

Vn(4dfs)