1LVS.CF(5)                     File Formats Manual                    LVS.CF(5)
2
3
4

NAME

6       lvs.cf - configuration file for lvs
7

DESCRIPTION

9       This  file  contains  the  configuration information for piranha and is
10       normally  located  in  /etc/sysconfig/ha/lvs.cf.  lvs.cf  is  read  and
11       updated  from  the piranha web configuration tool, which uses lvs(8) to
12       actually work with the file.
13

GLOBAL OPTIONS

15       Global settings affect all aspects of the  cluster,  including  virtual
16       servers and real servers.
17
18       service = [lvs|fos]
19              Indicates  which set of defined services are to be used. Virtual
20              Servers and Failover Services as  mutually  exclusive;  although
21              they  may  both  be defined in the same config file, thay cannot
22              both be running simultaneously.   This  option  specifies  which
23              section is to be used.
24
25       primary = a.b.c.d
26              This is the IP (or hostname) of the primary LVS machine.
27
28       primary_private = a.b.c.d
29              Indicates  the  IP  address of an alternative network device for
30              private heartbeating.  It is not  necessary  to  fill  out  this
31              field  for  piranha to work as it simply provides an alternative
32              method of checking an IP service is running.
33
34       backup = a.b.c.d
35              This is the IP (or hostname) of the  backup  (or  failover)  LVS
36              machine.
37
38       backup_private = a.b.c.d
39              This is akin to primary_private but refers to the alternative IP
40              device on the backup
41
42       backup_active = [0|1]
43              This dictates if the backup server option is active or inactive.
44              This option must be set if the backup server is to function in a
45              failover manner.
46
47       syncdaemon = [0|1]
48              This option dictates if the connection synchronization daemon is
49              active  or  inactive.   This option is only useful when a backup
50              server is defined. See ipvsadm(8) for more information.
51
52       syncd_iface = dev
53              This option dictates the network interface that the synchroniza‐
54              tion  daemon should use for sending and receiving multicast mes‐
55              sages.
56
57       syncd_id = n
58              This option dictates the syncid to be used by  the  synchroniza‐
59              tion daemon. Valid values for syncd_id are 0 to 255. The default
60              is 0.
61
62       heartbeat = [0|1]
63              Use heartbeat between the two LVS nodes.
64
65       keepalive = n
66              Number of seconds between heartbeats.
67
68       deadtime = n
69              Length of time before a node is declared dead  and  IP  takeover
70              occurs.
71
72       reservation_conflict_action = [nothing|preempt]
73              This  option  dictates  what  action should be taken when a scsi
74              reservation conflict occurs during  failover  and  the  disk  is
75              found  to  be  unexpectedly  locked.  You should think carefully
76              about this option as your setup may or may not have a scsi  con‐
77              troller setup to reset the scsi bus on power on or warm reboot.
78
79       debug = NONE
80              Ignore this option. Eventually it will become a means to dictate
81              how much and what type of information about  the  state  of  the
82              cluster is written to file.
83
84       hard_shutdown = [0|1]
85              With  this  option  (default 1) it is possible to have partially
86              running system. So problem with one nanny won't stop all others.
87
88       rsh_command =
89              The command family used to sync file systems and  config  files.
90              Allowable  options  are either rsh (default) or ssh.  The appro‐
91              priate .rhosts (or .ssh/authorized_keys) entries must be on  all
92              nodes so that connections can be made non-interactively.
93
94              Sync'ing  of  specified  config files and directories will occur
95              when lvs receives a SIGUSR1. lvs.cf(5) is  automatically  synced
96              between the LVS nodes anytime it is written to.
97
98       network = [direct|nat|tunnel]
99              The  lvs  virtual server can reroute all of its incoming traffic
100              via one of three methods;  NAT  (Network  Address  Translation),
101              Direct Routing, or Tunneling (IP Encapsulation).
102
103       nat_router = a.b.c.d dev:n
104              If  NAT  routing  is selected, this specifies the IP address and
105              device of the routing interface.
106
107       nat_nmask = a.b.c.d
108              Optional. The subnet mask to apply to nat_router.
109
110       tcp_timeout = n
111              This option specifies the timeout (in seconds) for TCP sessions.
112              A  timeout  value 0 means that the current timeout value is pre‐
113              served. Default timeout value is 0.
114
115       tcpfin_timeout = n
116              This option specifies the timeout (in seconds) for TCP  sessions
117              after  receiving  a FIN packet. A timeout value 0 means that the
118              current timeout value is preserved.  Default timeout value is 0.
119
120       udp_timeout = n
121              This option specifies the timeout (in seconds) for UDP  packets.
122              A  timeout  value 0 means that the current timeout value is pre‐
123              served. Default timeout value is 0.
124

PER-VIRTUAL SERVER SECTION

126       A per-virtual server section starts with
127
128           virtual server-name {
129
130           }
131
132       where the string is a unique server identifier.  This doesn't  have  to
133       match up to a FQDN.
134
135       The  following  items are required for each virtual server entry in the
136       config file.
137
138       address = a.b.c.d
139              This is the address to be used for the virtual server.
140
141       sorry_server = a.b.c.d
142              This is the address to be used for the 'sorry' server.  If spec‐
143              ified,  requests  for  this virtual server will be redirected to
144              this IP address in the event that no real servers are  available
145              to handle the request.
146
147       vip_nmask = a.b.c.d
148              Optional. This is the subnet mask to apply to the address of the
149              virtual server.
150
151       active = [0|1]
152              This flag is used to indicate whether  or  not  this  particular
153              virtual  server  is  active.  If it is marked inactive, then all
154              real servers being routed to by it will by default become  inac‐
155              tive as well.
156
157              The  following  items are all optional entries (note the default
158              values for many).
159
160       load_monitor = [uptime|rup|ruptime|none]
161              This specifies the method that the  LVS  can  acquire  CPU  load
162              information  from  the  real  servers.  This load information is
163              used to adjust the weighting factor for each server entry in the
164              LVS routing table.  Each method requires slightly different con‐
165              figurations to be present on the real servers  and  on  the  LVS
166              nodes.   The  default method is uptime. Specifying "none" causes
167              the service monitor to skip load tests (required for  most  non-
168              linux systems).
169
170       timeout =
171              This  is  the amount of time allowed before a presumed dead real
172              server is removed from the LVS routing  table.   Default  is  10
173              seconds.
174
175       reentry =
176              This  is  the  amount of time that a previously dead real server
177              must be alive before the LVS will re-enter it into  the  routing
178              table.   The  purpose  of  this  delay  is  to  prevent troubled
179              machines from causing a "ping-pong" effect.  The default is  180
180              seconds.
181
182       port = xx
183              This is the port that the virtual server is instructed to listen
184              to and redirect network requests from.  The default is  port  80
185              (http).
186
187       send = xxx
188              If  present, the specified text ("xxx") will be sent to the port
189              of the virtual server as part of the test for whether  the  ser‐
190              vice is operational. The text is limited to 255 characters maxi‐
191              mum. Characters must be printable/quotable, and may contain "\n,
192              \r, \\, or \'".  Note that if both "send" and "expect" are spec‐
193              ified, the send will always execute  before  the  read  for  the
194              expect is attempted.
195
196       send_program = path %h
197              For  more advanced service verification, you can use this direc‐
198              tive to specify the path  to  a  service-checking  script.  This
199              functionality  is  especially  helpful for services that require
200              dynamically changing data, such as HTTPS or SSL.   To  use  this
201              functionality,  you  must  write a script that returns a textual
202              response (that will be matched against 'expect' directive),  set
203              it to be executable, and specify the path to it.  To ensure that
204              each server in the real server pool is checked, use the  special
205              token  %h  after  the path to the script. This token is replaced
206              with each real server's IP address as the script  is  called  by
207              the nanny daemon.  If 'send_program' is used, then the 'send' is
208              ignored.
209
210       expect = xxx
211              If present, the specified text ("xxx") will  be  expected  as  a
212              response from the port on the virtual server as part of the test
213              for whether the service is operational. The text is  limited  to
214              255  characters  maximum. Characters must be printable/quotable,
215              and may contain "\n, \r, \\, or \'".  Note that if  both  "send"
216              and  "expect" are specified, the send will always execute before
217              the read for the expect is attempted.  If  you  wrote  your  own
218              service-checking  script, enter the response you told it to send
219              if it was successful.
220
221       use_regex = [0|1]
222              If enabled, the expect string will be interpreted as  a  regular
223              expression.
224
225       persistent =
226              The  number  of  seconds  that a connection between this virtual
227              server and a real server will persist. If a request is  received
228              from a client within this number of seconds, it will be assigned
229              to the same real server that processed a prior request. If  this
230              parameter  is missing or set to zero, connections with this vir‐
231              tual server are not persistent.
232
233       pmask =
234              The network mask to apply to persistence if enabled.  Default is
235              255.255.255.255.
236
237       scheduler = [rr|lc|wlc|wrr]
238              This is the key part of the LVS router.  These methods of sched‐
239              uling how incoming requests are routed  are  built  as  loadable
240              kernel   modules:  Round  Robin  (rr),  least-connections  (lc),
241              Weighted Least Connections (wlc, the default) and Weighted Round
242              Robin (wrr).
243
244   REAL SERVER SECTIONS
245       A per-real server section starts with
246
247           server servername {
248
249           }
250
251       where  the  string is a unique server identifier.  This doesn't have to
252       match up to any real FQDN.
253
254       The following items are required for each real server entry in the con‐
255       fig file.
256
257       address = a.b.c.d
258              This is the actual IP address being used by the real server.  In
259              the cases of NAT type  routing,  it  is  generally  one  of  the
260              reserved, private IPs.
261
262       active = [0|1]
263              This  flag  is  used  to indicate whether or not this particular
264              real server is active.
265
266              The following item is optional.
267
268       weight =
269              This option enforces a skew affect by enabling more loading on a
270              particular  server.   The  weights of all real servers influence
271              the scheduling algorithm and a higher weight will load a partic‐
272              ular server down with more redirects.  The default value is 1.
273
274       An example real server entry might look like:
275
276                    server 1 {
277                              address = 192.168.10.2
278                              active = 1
279                              weight = 1
280                    }
281
282

PER-FAILOVER SERVICE SECTION

284       A per-failover-service section starts with
285
286           failover service-name {
287           }
288
289       where the service-name is a unique identifier.
290
291       The following items are required for each failover service entry in the
292       config file.
293
294       address = a.b.c.d dev:x
295              This is the address and device interface to be used for the vir‐
296              tual service.
297
298       vip_nmask = a.b.c.d
299              Optional. The netmask to apply to the service address.
300
301       active = [0|1]
302              This  flag  is  used  to indicate whether or not this particular
303              virtual server is active.  If it is marked  inactive,  then  all
304              real  servers being routed to by it will by default become inac‐
305              tive as well.
306
307              The following items are all optional entries (note  the  default
308              values for many).
309
310       timeout =
311              This  is the amount of time allowed before a service is presumed
312              dead and will cause a failover.
313
314       reentry =
315              This is the amount of time that a previously dead partner system
316              must  be  alive  before  it  will  be  a  candidate for possible
317              failover. The purpose of  this  delay  is  to  prevent  troubled
318              machines  from causing a "ping-pong" effect.  The default is 180
319              seconds.
320
321       port = xx
322              This is the port that the  failover  service  is  instructed  to
323              test.  The default is port 80 (http).
324
325       send = xxx
326              If  present, the specified text ("xxx") will be sent to the port
327              of the virtual server as part of the test for whether  the  ser‐
328              vice is operational. The text is limited to 255 characters maxi‐
329              mum. Characters must be printable/quotable, and may contain "\n,
330              \r, \\, or \'".  Note that if both "send" and "expect" are spec‐
331              ified, the send will always execute  before  the  read  for  the
332              expect is attempted.
333
334       expect = xxx
335              If  present,  the  specified  text ("xxx") will be expected as a
336              response from the port on the virtual server as part of the test
337              for  whether  the service is operational. The text is limited to
338              255 characters maximum. Characters must  be  printable/quotable,
339              and  may contain "\n, \r, \\, or \'".  Expect can also be a sin‐
340              gle '*'  character  to  indicate  any  response  characters  are
341              allowed.   Note  that if both "send" and "expect" are specified,
342              the send will always execute before the read for the  expect  is
343              attempted.
344
345       start_cmd = xxx
346              Mandatory;  specifies  the  startup command/script to execute to
347              start the failover service. Options can be specified,  but  must
348              be separated by a single space.
349
350       stop_cmd = xxx
351              Mandatory;  specifies  the shutdown command/script to execute to
352              stop the failover service. Options can be specified, but must be
353              separated by a single space.
354
355

SEE ALSO

357       ipvsadm(8), lvs(8), fos(8), pulse(8).  sample.cf file
358       http://www.linuxvirtualserver.org
359
360
361
362                                  4 July 2001                        LVS.CF(5)
Impressum