Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / doc / install / Documentation / en_US / html / CmdRef / auarf162.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3190/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 5 Nov 1999 at 13:58:29                -->
7 <META HTTP-EQUIV="updated" CONTENT="Fri, 05 Nov 1999 13:58:29">
8 <META HTTP-EQUIV="review" CONTENT="Sun, 05 Nov 2000 13:58:29">
9 <META HTTP-EQUIV="expires" CONTENT="Mon, 05 Nov 2001 13:58:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf161.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf163.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRFS_SETSERVERPREFS" HREF="auarf002.htm#ToC_176">fs setserverprefs</A></H2>
19 <A NAME="IDX4971"></A>
20 <A NAME="IDX4972"></A>
21 <A NAME="IDX4973"></A>
22 <A NAME="IDX4974"></A>
23 <A NAME="IDX4975"></A>
24 <A NAME="IDX4976"></A>
25 <A NAME="IDX4977"></A>
26 <P><STRONG>Purpose</STRONG>
27 <P>Sets the Cache Manager&#39;s preference ranks for file server or VL Server
28 machines
29 <P><STRONG>Synopsis</STRONG>
30 <PRE><B>fs setserverprefs</B> [<B>-servers</B> &lt;<VAR>fileserver&nbsp;names&nbsp;and&nbsp;ranks</VAR>><SUP>+</SUP>]
31                   [<B>-vlservers</B> &lt;<VAR>VL&nbsp;server&nbsp;names&nbsp;and&nbsp;ranks</VAR>><SUP>+</SUP>]
32                   [<B>-file</B> &lt;<VAR>input&nbsp;from&nbsp;named&nbsp;file</VAR>>]  [<B>-stdin</B>]  [<B>-help</B>]
33    
34 <B>fs sets</B> [<B>-se</B> &lt;<VAR>fileserver&nbsp;names&nbsp;and&nbsp;ranks</VAR>><SUP>+</SUP>]  [<B>-vl</B> &lt;<VAR>VL&nbsp;server&nbsp;names&nbsp;and&nbsp;ranks</VAR>><SUP>+</SUP>]
35         [<B>-f</B> &lt;<VAR>input&nbsp;from&nbsp;named&nbsp;file</VAR>>]  [<B>-st</B>]  [<B>-h</B>]
36    
37 <B>fs sp</B> [<B>-se</B> &lt;<VAR>fileserver&nbsp;names&nbsp;and&nbsp;ranks</VAR>><SUP>+</SUP>]  [<B>-vl</B> &lt;<VAR>VL&nbsp;server&nbsp;names&nbsp;and&nbsp;ranks></VAR><SUP>+</SUP>]  
38       [<B>-f</B> &lt;<VAR>input&nbsp;from&nbsp;named&nbsp;file</VAR>>]  [<B>-st</B>]  [<B>-h</B>]
39 </PRE>
40 <P><STRONG>Description</STRONG>
41 <P>The <B>fs setserverprefs</B> command sets the local Cache
42 Manager&#39;s preference ranks for one or more file server machine interfaces
43 or, if the <B>-vlserver</B> argument is provided, for Volume Location (VL)
44 Server machines. For file server machines, the numerical ranks
45 determine the order in which the Cache Manager attempts to contact the
46 interfaces of machines that are housing a volume. For VL Server
47 machines, the ranks determine the order in which the Cache Manager attempts to
48 contact a cell&#39;s VL Servers when requesting VLDB information.
49 <P>The <B>fs getserverprefs</B> reference page explains how the Cache
50 Manager uses preference ranks when contacting file server machines or VL
51 Server machines. The following paragraphs explain how the Cache Manager
52 calculates default ranks, and how to use this command to change the
53 defaults.
54 <P><B>Calculation of Default Preference Ranks</B>
55 <P>The Cache Manager stores a preference rank in kernel memory as a paired IP
56 address and numerical rank. If a file server machine is multihomed, the
57 Cache Manager assigns a distinct rank to each of the machine&#39;s addresses
58 (up to the number of addresses that the VLDB can store per machine, which is
59 specified in the <I>AFS Release Notes</I>). Once calculated, a rank
60 persists until the machine reboots, or until this command is used to change
61 it.
62 <P>The Cache Manager sets default VL Server preference ranks as it
63 initializes, randomly assigning a rank from the range 10,000 to 10,126 to each
64 of the machines listed in the local <B>/usr/vice/etc/CellServDB</B>
65 file. Machines from different cells can have the same rank, but this
66 does not present a problem because the Cache Manager consults only one
67 cell&#39;s ranks at a time.
68 <P>The Cache Manager sets default preference ranks for file server machine as
69 it fetches volume location information from the VLDB. Each time it
70 learns about file server machine interfaces for which it has not already set
71 ranks, it assigns a rank to each interface. If the local client machine
72 has only one IP address, the Cache Manager compares it to the server
73 interface&#39;s IP address and sets a rank according to the following
74 algorithm. If the client machine is multihomed, the Cache Manager
75 applies the algorithm to each of the client machine&#39;s addresses and
76 assigns to the file server machine interface the lowest rank that
77 results.
78 <UL>
79 <P><LI>If the local machine is a file server machine, the base rank for each of
80 its interfaces is 5,000.
81 <P><LI>If the file server machine interface is on the same subnetwork as the
82 client interface, its base rank is 20,000.
83 <P><LI>If the file server machine interface is on the same network as the client
84 interface, or is at the distant end of a point-to-point link with the client
85 interface, its base rank is 30,000.
86 <P><LI>If the file server machine interface is on a different network than the
87 client interface, or the Cache Manager cannot obtain network information about
88 it, its base rank is 40,000.
89 </UL>
90 <P>After assigning a base rank to a file server machine interface, the Cache
91 Manager adds to it a number randomly chosen from the range 0 (zero) to
92 14. As an example, a file server machine interface in the same
93 subnetwork as the local machine receives a base rank of 20,000, but the Cache
94 Manager records the actual rank as an integer between 20,000 and
95 20,014. This process reduces the number of interfaces that have exactly
96 the same rank. As with VL Server machine ranks, it is possible for file
97 server machine interfaces from foreign cells to have the same rank as
98 interfaces in the local cell, but this does not present a problem. Only
99 the relative ranks of the interfaces that house a given volume are relevant,
100 and AFS only supports storage of a volume in one cell at a time.
101 <P><B>Setting Non-default Preference Ranks</B>
102 <P>Use the <B>fs setserverprefs</B> command to reset an existing
103 preference rank, or to set the initial rank of a file server machine interface
104 or VL Server machine for which the Cache Manager has no rank. To make a
105 rank persist across a reboot of the local machine, place the appropriate
106 <B>fs setserverprefs</B> command in the machine&#39;s AFS initialization
107 file.
108 <P>Specify each preference rank as a pair of values separated by one or more
109 spaces&#58;
110 <UL>
111 <P><LI>The first member of the pair is the fully-qualified hostname (for example,
112 <B>fs1.abc.com</B>), or the IP address in dotted decimal
113 format, of a file server machine interface or VL Server machine
114 <P><LI>The second member of the pair is an integer. The possible ranks
115 range from <B>1</B> through <B>65535</B>.
116 </UL>
117 <P>As with default ranks, the Cache Manager adds a randomly chosen integer to
118 a rank specified by this command. For file server machine interfaces,
119 the integer is from the range 0 (zero) to 14; for VL Server machines, it
120 is from the range 0 (zero) to 126. For example, if the administrator
121 assigns a rank of 15,000 to a file server machine interface, the Cache Manager
122 stores an integer between 15,000 to 15,014.
123 <P>There are several ways to provide ranks for file server machine interfaces
124 (but not for VL Server machines)&#58;
125 <UL>
126 <P><LI>On the command line, following the <B>-servers</B> argument.
127 <P><LI>In a file named by the <B>-file</B> argument. Place each pair
128 on its own line in the file. Directing the output from the <B>fs
129 getserverprefs</B> command to a file automatically generates a file with the
130 proper format.
131 <P><LI>Via the standard input stream, by providing the <B>-stdin</B>
132 flag. This method enables the issuer to feed in values directly from a
133 program or script that generates preference ranks by using an algorithm
134 appropriate to the local cell. The AFS distribution does not include
135 such programs or scripts.
136 </UL>
137 <P>When setting file server machine preference ranks, it is legal to combine
138 the <B>-servers</B>, <B>-file</B>, and <B>-stdin</B> options on a
139 single command line. If different options specify a different rank for
140 the same interface, the Cache Manager stores and uses the rank assigned with
141 the <B>-servers</B> argument.
142 <P>The <B>-vlservers</B> argument is the only way to assign VL Server
143 machine ranks. It can be combined with one or more of the
144 <B>-servers</B>, <B>-file</B>, and <B>-stdin</B> options, but the
145 Cache Manager applies the values provided for those options to file server
146 machine ranks only.
147 <P>The <B>fs</B> command interpreter does not verify hostnames or IP
148 addresses, and so assigns preference ranks to invalid machine names or
149 addresses. The Cache Manager never uses such ranks unless the same
150 incorrect information is in the VLDB.
151 <P><STRONG>Options</STRONG>
152 <DL>
153 <P><DT><B>-servers
154 </B><DD>Specifies one or more file server machine preference ranks. Each
155 rank pairs the fully-qualified hostname or IP address (in dotted decimal
156 format) of a file server machine&#39;s interface with an integer rank,
157 separated by one or more spaces; also separate each pair with one or more
158 spaces. Acceptable values for the rank range from <B>1</B> through
159 <B>65521</B>; a lower value indicates a greater preference.
160 Providing ranks outside this range can have unpredictable results.
161 Providing a value no larger than <B>65521</B> guarantees that the rank
162 does not exceed the maximum possible value of 65,535 even if the largest
163 random factor (14) is added. 
164 <P>This argument can be combined with the <B>-file</B> argument,
165 <B>-stdin</B> flag, or both. If more than one of the arguments sets
166 a rank for the same interface, the rank set by this argument takes
167 precedence. It can also be combined with the <B>-vlservers</B>
168 argument, but does not interact with it.
169 <P><DT><B>-vlservers
170 </B><DD>Specifies one or more VL Server preference ranks. Each rank pairs
171 the fully-qualified hostname or IP address (in dotted decimal format) of a VL
172 Server machine with an integer rank, separated by one or more spaces;
173 also separate each pair with one or more spaces. Acceptable values for
174 the rank range from <B>1</B> through <B>65521</B>; a lower value
175 indicates a greater preference. Providing ranks outside this range can
176 have unpredictable results. Providing a value no larger than
177 <B>65521</B> guarantees that the rank does not exceed the maximum possible
178 value of 65,535 even if the largest random factor (14) is added. 
179 <P>This argument can be combined with the <B>-servers</B> argument,
180 <B>-file</B> argument, <B>-stdin</B> flag, or any combination of the
181 three, but does not interact with any of them. They apply only to file
182 server machine ranks.
183 <P><DT><B>-file
184 </B><DD>Specifies the full pathname of a file from which to read pairs of file
185 server machine interfaces and their ranks, using the same notation and range
186 of values as for the <B>-servers</B> argument. In the file, place
187 each pair on its own line and separate the two parts of each pair with one or
188 more spaces.
189 <P>This argument can be combined with the <B>-servers</B> argument,
190 <B>-stdin</B> flag, or both. If more than one of the arguments sets
191 a rank for the same interface, the rank set by the <B>-server</B> argument
192 takes precedence. It can also be combined with the
193 <B>-vlservers</B> argument, but does not interact with it.
194 <P><DT><B>-stdin
195 </B><DD>Reads pairs of file server machine interface and integer rank from the
196 standard input stream. The intended use is to accept input piped in
197 from a user-defined program or script that generates ranks in the appropriate
198 format, but it also accepts input typed to the shell. Format the
199 interface and rank pairs as for the <B>-file</B> argument. If
200 typing at the shell, type <B>&lt;Ctrl-d></B> after the final newline to
201 complete the input.
202 <P>This argument can be combined with the <B>-servers</B> argument, the
203 <B>-file</B> argument, or both. If more than one of the arguments
204 sets a rank for the same interface, the rank set by the <B>-server</B>
205 argument takes precedence. It can also be combined with the
206 <B>-vlservers</B> argument, but does not interact with it.
207 <P><DT><B>-help
208 </B><DD>Prints the online help for this command. All other valid options
209 are ignored.
210 </DL>
211 <P><STRONG>Examples</STRONG>
212 <P>The following command sets the Cache Manager&#39;s preference ranks for
213 the file server machines named <B>fs3.abc.com</B> and
214 <B>fs4.abc.com</B>, the latter of which is specified by its
215 IP address, 192.12.105.100. The machines reside in
216 another subnetwork of the local machine&#39;s network, so their default base
217 rank is 30,000. To increase the Cache Manager&#39;s preference for
218 these machines, the issuer assigns a rank of <B>25000</B>, to which the
219 Cache Manager adds an integer in the range from 0 to 15.
220 <PRE>   # <B>fs setserverprefs -servers fs3.abc.com 25000 192.12.105.100 25000</B>
221    
222 </PRE>
223 <P>The following command uses the <B>-servers</B> argument to set the
224 Cache Manager&#39;s preference ranks for the same two file server machines,
225 but it also uses the <B>-file</B> argument to read a collection of
226 preference ranks from a file that resides in the local file
227 <B>/etc/fs.prefs</B>&#58;
228 <PRE>   # <B>fs setserverprefs -servers fs3.abc.com 25000 192.12.105.100 25000</B>  \ 
229                        <B>-file /etc/fs.prefs</B>
230    
231 </PRE>
232 <P>The <B>/etc/fs.prefs</B> file has the following contents and
233 format&#58;
234 <PRE>   192.12.108.214        7500
235    192.12.108.212        7500
236    138.255.33.41         39000
237    138.255.33.34         39000
238    128.0.45.36           41000
239    128.0.45.37           41000
240    
241 </PRE>
242 <P>The following command uses the <B>-stdin</B> flag to read preference
243 ranks from the standard input stream. The ranks are piped to the
244 command from a program, <B>calc_prefs</B>, which was written by the issuer
245 to calculate preferences based on values significant to the local cell.
246 <PRE>   # <B>calc_prefs | fs setserverprefs -stdin</B>
247    
248 </PRE>
249 <P>The following command uses the <B>-vlservers</B> argument to set the
250 Cache Manager&#39;s preferences for the VL server machines named
251 <B>fs1.abc.com</B>, <B>fs3.abc.com</B>,
252 and <B>fs4.abc.com</B> to base ranks of 1, 11000, and 65521,
253 respectively&#58;
254 <PRE>   # <B>fs setserverprefs -vlservers fs1.abc.com 1 fs3.abc.com 11000</B>  \
255                        <B>fs4.abc.com 65521</B>
256    
257 </PRE>
258 <P><STRONG>Privilege Required</STRONG>
259 <P>The issuer must be logged in as the local superuser <B>root</B>.
260 <P><STRONG>Related Information</STRONG>
261 <P><A HREF="auarf146.htm#HDRFS_GETSERVERPREFS">fs getserverprefs</A>
262 <P>
263 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf161.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf163.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
264 <!-- Begin Footer Records  ========================================== -->
265 <P><HR><B> 
266 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
267 </B> 
268 <!-- End Footer Records  ============================================ -->
269 <A NAME="Bot_Of_Page"></A>
270 </BODY></HTML>