4c6548ee33776cbec57d8092851ebf7e56ced3fc
[openafs.git] / doc / man-pages / pod1 / fs_getserverprefs.pod
1 =head1 NAME
2
3 fs getserverprefs - Displays preference ranks for file servers or VL servers
4
5 =head1 SYNOPSIS
6
7 B<fs getserverprefs> [B<-file> <I<output to named file>>]
8     [B<-numeric>] [B<-vlservers>] [B<-help>]
9
10 B<fs gets> [B<-f> <I<output to named file>>] [B<-n>] [B<-v>] [B<-h>]
11
12 B<fs gp> [B<-f> <I<output to named file>>] [B<-n>] [B<-v>] [B<-h>]
13
14 =head1 DESCRIPTION
15
16 The B<fs getserverprefs> command displays preference ranks for file server
17 machine interfaces (file server machines run the B<fs> process) or, if the
18 B<-vlserver> flag is provided, for Volume Location (VL) Server machines
19 (which run the B<vlserver> process). For file server machines, the Cache
20 Manager tracks up to 15 interfaces per machine and assigns a separate rank
21 to each interface. The ranks indicate the order in which the local Cache
22 Manager attempts to contact the interfaces of machines that are housing a
23 volume when it needs to fetch data from the volume. For VL Server
24 machines, the ranks indicate the order in which the Cache Manager attempts
25 to contact a cell's VL Servers when requesting VLDB information. For both
26 types of rank, lower integer values are more preferred.
27
28 The Cache Manager stores ranks in kernel memory. Once set, a rank persists
29 until the machine reboots, or until the B<fs setserverprefs> command is
30 used to change it. The reference page for the B<fs setserverprefs> command
31 explains how the Cache Manager sets default ranks, and how to use that
32 command to change the default values.
33
34 Default VL Server ranks range from 10,000 to 10,126, and the Cache Manager
35 assigns them to every machine listed in its copy of the
36 F</usr/vice/etc/CellServDB> file. When the Cache Manager needs to fetch
37 VLDB information from a cell, it compares the ranks for the VL Server
38 machines belonging to that cell, and attempts to contact the VL Server
39 with the lowest integer rank. If the Cache Manager cannot reach the VL
40 Server (because of server process, machine or network outage), it tries to
41 contact the VL Server with the next lowest integer rank, and so on. If all
42 of a cell's VL Server machines are unavailable, the Cache Manager cannot
43 fetch data from the cell.
44
45 Default file server ranks range from 5,000 to 40,000, excluding the range
46 used for VL Servers (10,000 to 10,126); the maximum possible rank is
47 65,534. When the Cache Manager needs to fetch data from a volume, it
48 compares the ranks for the interfaces of machines that house the volume,
49 and attempts to contact the interface that has the lowest integer rank. If
50 it cannot reach the B<fileserver> process via that interface (because of
51 server process, machine or network outage), it tries to contact the
52 interface with the next lowest integer rank, and so on. If it cannot reach
53 any of the interfaces for machines that house the volume, it cannot fetch
54 data from the volume.
55
56 For both file server machines and VL Server machines, it is possible for a
57 machine or interface in a foreign cell to have the same rank as a machine
58 or interface in the local cell. This does not present a problem, because
59 the Cache Manager only ever compares ranks for machines belonging to one
60 cell at a time.
61
62 =head1 OPTIONS
63
64 =over 4
65
66 =item B<-file> <I<output file>>
67
68 Specifies the full pathname of a file to which to write the preference
69 ranks. If the specified file already exists, the command overwrites its
70 contents. If the pathname is invalid, the command fails. If this argument
71 is not provided, the preference ranks appear on the standard output
72 stream.
73
74 =item B<-numeric>
75
76 Displays the IP addresses of file server machine interfaces or VL Server
77 machines, rather than their hostnames. If this argument is not provided,
78 the B<fs> command interpreter has the IP addresses translated to hostnames
79 such as C<fs1.abc.com>.
80
81 =item B<-vlservers>
82
83 Displays preference ranks for VL Server machines rather than file server
84 machine interfaces.
85
86 =item B<-help>
87
88 Prints the online help for this command. All other valid options are
89 ignored.
90
91 =back
92
93 =head1 OUTPUT
94
95 The output consists of a separate line for each file server machine
96 interface or VL Server machine, pairing the machine's hostname or IP
97 address with its rank. The Cache Manager stores IP addresses in its kernel
98 list of ranks, but the command by default identifies interfaces by
99 hostname, by calling a translation routine that refers to either the
100 cell's name service (such as the Domain Name Server) or the local host
101 table. If an IP address appears in the output, it is because the
102 translation attempt failed. To bypass the translation step and display IP
103 addresses rather than hostnames, include the B<-numeric> flag. This can
104 significantly speed the production of output.
105
106 By default, the command writes to the standard output stream. Use the
107 B<-file> argument to write the output to a file instead.
108
109 =head1 EXAMPLES
110
111 The following example displays the local Cache Manager's preference ranks
112 for file server machines. The local machine belongs to the AFS cell named
113 B<abc.com>, and in this example the ranks of file server machines in its
114 local cell are lower than the ranks of file server machines from the
115 foreign cell, C<def.com>. It is not possible to translate the IP addresses
116 of two machines on the 138.255 network.
117
118    % fs getserverprefs
119    fs2.abc.com           20007
120    fs3.abc.com           30002
121    fs1.abc.com           20011
122    fs4.abc.com           30010
123    server1.def.com       40002
124    138.255.33.34         40000
125    server6.def.com       40012
126    138.255.33.37         40005
127
128 The following example shows hows the output displays IP addresses when the
129 B<-numeric> flag is included, and illustrates how network proximity
130 determines default ranks (as described on the B<fs setserverprefs>
131 reference page). The local machine has IP address 192.12.107.210, and the
132 two file server machines on its subnetwork have ranks of 20,007 and
133 20,011. The two file server machines on a different subnetwork of the
134 local machine's network have higher ranks, 30,002 and 30,010, whereas the
135 ranks of the remaining machines range from 40,000 to 40,012 because they
136 are in a completely different network.
137
138    % fs getserverprefs -numeric
139    192.12.107.214          20007
140    192.12.105.99           30002
141    192.12.107.212          20011
142    192.12.105.100          30010
143    138.255.33.41           40002
144    138.255.33.34           40000
145    138.255.33.36           40012
146    138.255.33.37           40005
147
148 The example shows how the B<-vlservers> flag displays preference ranks for
149 VL Server machines:
150
151    % fs getserverprefs -vlservers
152    fs2.abc.com            10052
153    fs3.abc.com            10113
154    fs1.abc.com            10005
155
156 =head1 PRIVILEGE REQUIRED
157
158 None
159
160 =head1 SEE ALSO
161
162 L<fs_setserverprefs(1)>
163
164 =head1 COPYRIGHT
165
166 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
167
168 This documentation is covered by the IBM Public License Version 1.0.  It was
169 converted from HTML to POD by software written by Chas Williams and Russ
170 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.