A replicated DCE LFS fileset typically has multiple read-only replicas. Each replica provides the same data, but each resides on a different File Server. When the Cache Manager needs to access data from a read-only replica, the FL Server provides the Cache Manager with the names of all File Servers on which that replica resides. As with File Servers, there can be multiple FL servers. The Cache Manager must choose the FL server to query for fileset locations and then choose the Fileset Server to access.
To choose from among these servers, the Cache Manager consults its collection of File Server and FL Server preferences. Each preference consists of the host name or Internet Protocol (IP) address of a server and the machine's numerical rank in the range from1 to 65,534. The Cache Manager attempts to access the server that has the lowest recorded rank. If two FL Servers have the same rank, the Cache Manager selects them in the order in which their names appear in the file system junction. If two File Servers have the same rank, the Cache Manager selects them in the order in which it received their names from the FL Server.
If the Cache Manager cannot access the server with the lowest rank - because the machine is currently unavailable, for example - it attempts to access the server with the next lowest rank. It continues in this fashion until it either succeeds or determines that all File Servers or FL Servers are unavailable.
The Cache Manager stores its server preferences in the kernel of the local machine. Therefore, it loses its current preferences each time it is initialized. To rebuild its preferences following initialization, the Cache Manager assigns a default rank to each File Server or FL Server that it contacts. The Cache Manager bases its default ranks on IP addresses, as follows:
· If the local machine is also a File Server or FL Server, it receives an initial rank of 5000.
· Each File Server of FL Server in the same subnetwork as the local machine receives an initial rank of 20,000.
· Each File Server or FL Server in the same network as the local machine receives an initial rank of 30,000.
· Each File Server of FL Server in a different network from the local machine, or for which the Cache Manager can determine no network information, receives an initial rank of 40,000.
When multiple server entries have the same rank, the Cache Manager chooses between connections to suitable serves by picking the machine with the lowest round-trip time. When initialized, the Cache Manager assigns a randomly adjusted round-trip time value to each server entry in the preference list. The assigned round-trip time value is always greater than the limit for recorded values for actual round-trip times, thus biasing the selection process to any connection that the Cache Manager has actually made. The assigned round-trip time value ensures that if more than one entry have the same rank (a very probable event given the default values assigned to entries) then no single entry will receive all requests from the various DFS clients.
To display the Cache Manager's current set of File Server preferences, use the cm getpreferences command. Use the cm getpreferences command with the -fldb option to display the current set of FL Server connection preferences.. By default, the command displays its output on standard output, but you can direct the output to a specified file. Note that each server will normally have up to four entries, each with a different IP address.
To specify preferences for one or more File Servers, use the cm setpreferences command. Use the cm setpreferences command with the-fldb option to specify preferences for one or more FL Server connections. Each preference entry that you specify must consist of the following pair of values: the machine specifications (either the host name or IP address of the File Server or FL Server) and that machine's rank in the form of an integer in the range from 1 to 65,534 (lower ranks have a higher preference). You can specify up to four preferences entries for the same server, with each entry using a different IP address.
Use the command's options to specify pairs of File Server or FL Servers and their respective ranks as follows:
· Use the -server option to specify one or more server-rank pairs on the command line. If the -fldb option is not used, the -server option specifies File Servers and their ranks. For example, the following command assigns the File Servers named fs1.abc.com and fs2.abc.com ranks of 19,000 and 21,000, respectively:
# cm setp -se fs1.abc.com 19000 fs2.abc.com 21000
· Use the -fldb option to specify that the -server option is setting ranks for one or more FL Servers. For example, the following command assigns the FL Servers named fl1.abc.com and fl2.abc.com ranks of 15,000 and 25,000, respectively:
# cm setp -se fl1.abc.com 15000 fl2.abc.com 25000 -fldb
· Use the -path option to specify the path name of a file that contains server preferences. (The output from the cm getpreferences command can be redirected to create such a file). For example, the following command reads a collection of preferences from a file that resides on the local machine at /etc/cm.prefs:
# cm setp -pa /etc/cm.prefs
The file to be read should contain lines like the following:
121.86.33.41 39000
121.86.33.34 39000
121.86.33.36 41000
121.86.33.37 41000
· Use the -stdin option to read server-rank pairs from standard input. For example, the following command reads preferences piped to the command from a user-defined program named mkprefs:
# mkprefs | cm setp -st
The program should generate preferences in the following format:
fs3.abc.com 15000 fs4.abc.com 25000
The -server, -path, and -stdin options are not mutually exclusive. You can include any combination of the options with the cm setpreferences command. If the Cache Manager already has a rank for a File Server or FL Server that you specify, the rank you specify replaces the machine's existing rank.
Each Cache Manager maintains its own collection of preferences, so two Cache Managers can have two different ranks for the same File Server or FL Server connection.
To load a predefined collection of preferences each time the Cache Manager is initialized, include the cm setpreferences command in the machine's initialization file.
More:
Displaying File Server and FL Server Preferences
Setting File Server Preferences