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/piranha/lvs.cf. lvs.cf  is  read  and  updated
11       from  the piranha web configuration tool, which uses lvs(8) to actually
12       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       heartbeat = [0|1]
48              Use heartbeat between the two LVS nodes.
49
50       keepalive = n
51              Number of seconds between heartbeats.
52
53       deadtime = n
54              Length of time before a node is declared dead  and  IP  takeover
55              occurs.
56
57       reservation_conflict_action = [nothing|preempt]
58              This  option  dictates  what  action should be taken when a scsi
59              reservation conflict occurs during  failover  and  the  disk  is
60              found  to  be  unexpectedly  locked.  You should think carefully
61              about this option as your setup may or may not have a scsi  con‐
62              troller setup to reset the scsi bus on power on or warm reboot.
63
64       debug = NONE
65              Ignore this option. Eventually it will become a means to dictate
66              how much and what type of information about  the  state  of  the
67              cluster is written to file.
68
69       rsh_command =
70              The  command  family used to sync file systems and config files.
71              Allowable options are either rsh (default) or ssh.   The  appro‐
72              priate  .rhosts (or .ssh/authorized_keys) entries must be on all
73              nodes so that connections can be made non-interactively.
74
75              Sync'ing of specified config files and  directories  will  occur
76              when  lvs  receives a SIGUSR1. lvs.cf(5) is automatically synced
77              between the LVS nodes anytime it is written to.
78
79       network = [direct|nat|tunnel]
80              The lvs virtual server can reroute all of its  incoming  traffic
81              via  one  of  three  methods; NAT (Network Address Translation),
82              Direct Routing, or Tunneling (IP Encapsulation).
83
84       nat_router = a.b.c.d dev:n
85              If NAT routing is selected, this specifies the  IP  address  and
86              device of the routing interface.
87
88       nat_nmask = a.b.c.d
89              Optional. The subnet mask to apply to nat_router.
90

PER-VIRTUAL SERVER SECTION

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

PER-FAILOVER SERVICE SECTION

250       A per-failover-service section starts with
251
252           failover service-name {
253           }
254
255       where the service-name is a unique identifier.
256
257       The following items are required for each failover service entry in the
258       config file.
259
260       address = a.b.c.d dev:x
261              This is the address and device interface to be used for the vir‐
262              tual service.
263
264       vip_nmask = a.b.c.d
265              Optional. The netmask to apply to the service address.
266
267       active = [0|1]
268              This flag is used to indicate whether  or  not  this  particular
269              virtual  server  is  active.  If it is marked inactive, then all
270              real servers being routed to by it will by default become  inac‐
271              tive as well.
272
273              The  following  items are all optional entries (note the default
274              values for many).
275
276       timeout =
277              This is the amount of time allowed before a service is  presumed
278              dead and will cause a failover.
279
280       reentry =
281              This is the amount of time that a previously dead partner system
282              must be alive  before  it  will  be  a  candidate  for  possible
283              failover.  The  purpose  of  this  delay  is to prevent troubled
284              machines from causing a "ping-pong" effect.  The default is  180
285              seconds.
286
287       port = xx
288              This  is  the  port  that  the failover service is instructed to
289              test.  The default is port 80 (http).
290
291       send = xxx
292              If present, the specified text ("xxx") will be sent to the  port
293              of  the  virtual server as part of the test for whether the ser‐
294              vice is operational. The text is limited to 255 characters maxi‐
295              mum. Characters must be printable/quotable, and may contain "\n,
296              \r, \\, or \'".  Note that if both "send" and "expect" are spec‐
297              ified,  the  send  will  always  execute before the read for the
298              expect is attempted.
299
300       expect = xxx
301              If present, the specified text ("xxx") will  be  expected  as  a
302              response from the port on the virtual server as part of the test
303              for whether the service is operational. The text is  limited  to
304              255  characters  maximum. Characters must be printable/quotable,
305              and may contain "\n, \r, \\, or \'".  Expect can also be a  sin‐
306              gle  '*'  character  to  indicate  any  response  characters are
307              allowed.  Note that if both "send" and "expect"  are  specified,
308              the  send  will always execute before the read for the expect is
309              attempted.
310
311       start_cmd = xxx
312              Mandatory; specifies the startup command/script  to  execute  to
313              start  the  failover service. Options can be specified, but must
314              be separated by a single space.
315
316       stop_cmd = xxx
317              Mandatory; specifies the shutdown command/script to  execute  to
318              stop the failover service. Options can be specified, but must be
319              separated by a single space.
320
321

SEE ALSO

323       ipvsadm(8), lvs(8), fos(8), pulse(8).  sample.cf file
324       http://www.linuxvirtualserver.org
325
326
327
328                                  4 July 2001                        LVS.CF(5)
Impressum