LVS.CF - Online Linux Manual PageSection : 5
Updated : 4 July 2001
NAMElvs.cf − configuration file for lvs
DESCRIPTIONThis file contains the configuration information for piranha and is normally located in /etc/sysconfig/ha/lvs.cf. lvs.cf is read and updated from the piranha web configuration tool, which uses lvs(8) to actually work with the file.
GLOBAL OPTIONSGlobal settings affect all aspects of the cluster, including virtual servers and real servers. service = [lvs|fos] Indicates which set of defined services are to be used. Virtual Servers and Failover Services as mutually exclusive; although they may both be defined in the same config file, thay cannot both be running simultaneously. This option specifies which section is to be used. primary = a.b.c.d This is the IP (or hostname) of the primary LVS machine. primary_private = a.b.c.d Indicates the IP address of an alternative network device for private heartbeating. It is not necessary to fill out this field for piranha to work as it simply provides an alternative method of checking an IP service is running. backup = a.b.c.d This is the IP (or hostname) of the backup (or failover) LVS machine. backup_private = a.b.c.d This is akin to primary_private but refers to the alternative IP device on the backup backup_active = [0|1] This dictates if the backup server option is active or inactive. This option must be set if the backup server is to function in a failover manner. syncdaemon = [0|1] This option dictates if the connection synchronization daemon is active or inactive. This option is only useful when a backup server is defined. See ipvsadm(8) for more information. syncd_iface = dev This option dictates the network interface that the synchronization daemon should use for sending and receiving multicast messages. syncd_id = n This option dictates the syncid to be used by the synchronization daemon. Valid values for syncd_id are 0 to 255. The default is 0. heartbeat = [0|1] Use heartbeat between the two LVS nodes. keepalive = n Number of seconds between heartbeats. deadtime = n Length of time before a node is declared dead and IP takeover occurs. reservation_conflict_action = [nothing|preempt] This option dictates what action should be taken when a scsi reservation conflict occurs during failover and the disk is found to be unexpectedly locked. You should think carefully about this option as your setup may or may not have a scsi controller setup to reset the scsi bus on power on or warm reboot. debug = NONE Ignore this option. Eventually it will become a means to dictate how much and what type of information about the state of the cluster is written to file. hard_shutdown = [0|1] With this option (default 1) it is possible to have partially running system. So problem with one nanny won't stop all others. rsh_command = The command family used to sync file systems and config files. Allowable options are either rsh (default) or ssh. The appropriate .rhosts (or .ssh/authorized_keys) entries must be on all nodes so that connections can be made non-interactively. Sync'ing of specified config files and directories will occur when lvs receives a SIGUSR1. lvs.cf(5) is automatically synced between the LVS nodes anytime it is written to. network = [direct|nat|tunnel] The lvs virtual server can reroute all of its incoming traffic via one of three methods; NAT (Network Address Translation), Direct Routing, or Tunneling (IP Encapsulation). nat_router = a.b.c.d dev:n If NAT routing is selected, this specifies the IP address and device of the routing interface. nat_nmask = a.b.c.d Optional. The subnet mask to apply to nat_router. tcp_timeout = n This option specifies the timeout (in seconds) for TCP sessions. A timeout value 0 means that the current timeout value is preserved. Default timeout value is 0. tcpfin_timeout = n This option specifies the timeout (in seconds) for TCP sessions after receiving a FIN packet. A timeout value 0 means that the current timeout value is preserved. Default timeout value is 0. udp_timeout = n This option specifies the timeout (in seconds) for UDP packets. A timeout value 0 means that the current timeout value is preserved. Default timeout value is 0.
PER-VIRTUAL SERVER SECTIONA per-virtual server section starts with virtual server-name {
}where the string is a unique server identifier. This doesn't have to match up to a FQDN. The following items are required for each virtual server entry in the config file. address = a.b.c.d This is the address to be used for the virtual server. sorry_server = a.b.c.d This is the address to be used for the 'sorry' server. If specified, requests for this virtual server will be redirected to this IP address in the event that no real servers are available to handle the request. vip_nmask = a.b.c.d Optional. This is the subnet mask to apply to the address of the virtual server. active = [0|1] This flag is used to indicate whether or not this particular virtual server is active. If it is marked inactive, then all real servers being routed to by it will by default become inactive as well. The following items are all optional entries (note the default values for many). load_monitor = [uptime|rup|ruptime|none] This specifies the method that the LVS can acquire CPU load information from the real servers. This load information is used to adjust the weighting factor for each server entry in the LVS routing table. Each method requires slightly different configurations to be present on the real servers and on the LVS nodes. The default method is uptime. Specifying "none" causes the service monitor to skip load tests (required for most non-linux systems). timeout = This is the amount of time allowed before a presumed dead real server is removed from the LVS routing table. Default is 10 seconds. reentry = This is the amount of time that a previously dead real server must be alive before the LVS will re-enter it into the routing table. The purpose of this delay is to prevent troubled machines from causing a "ping-pong" effect. The default is 180 seconds. port = xx This is the port that the virtual server is instructed to listen to and redirect network requests from. The default is port 80 (http). send = xxx If present, the specified text ("xxx") will be sent to the port of the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \\r, \\\\, or \\'". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted. send_program = path %h For more advanced service verification, you can use this directive to specify the path to a service-checking script. This functionality is especially helpful for services that require dynamically changing data, such as HTTPS or SSL. To use this functionality, you must write a script that returns a textual response (that will be matched against 'expect' directive), set it to be executable, and specify the path to it. To ensure that each server in the real server pool is checked, use the special token %h after the path to the script. This token is replaced with each real server's IP address as the script is called by the nanny daemon. If 'send_program' is used, then the 'send' is ignored. expect = xxx If present, the specified text ("xxx") will be expected as a response from the port on the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \\r, \\\\, or \\'". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted. If you wrote your own service-checking script, enter the response you told it to send if it was successful. use_regex = [0|1] If enabled, the expect string will be interpreted as a regular expression. persistent = The number of seconds that a connection between this virtual server and a real server will persist. If a request is received from a client within this number of seconds, it will be assigned to the same real server that processed a prior request. If this parameter is missing or set to zero, connections with this virtual server are not persistent. pmask = The network mask to apply to persistence if enabled. Default is 255.255.255.255. scheduler = [rr|lc|wlc|wrr] This is the key part of the LVS router. These methods of scheduling how incoming requests are routed are built as loadable kernel modules: Round Robin (rr), least-connections (lc), Weighted Least Connections (wlc, the default) and Weighted Round Robin (wrr).
REAL SERVER SECTIONSA per-real server section starts with server servername {
}where the string is a unique server identifier. This doesn't have to match up to any real FQDN. The following items are required for each real server entry in the config file. address = a.b.c.d This is the actual IP address being used by the real server. In the cases of NAT type routing, it is generally one of the reserved, private IPs. active = [0|1] This flag is used to indicate whether or not this particular real server is active. The following item is optional. weight = This option enforces a skew affect by enabling more loading on a particular server. The weights of all real servers influence the scheduling algorithm and a higher weight will load a particular server down with more redirects. The default value is 1. An example real server entry might look like: server 1 {
address = 192.168.10.2
active = 1
weight = 1
}
PER-FAILOVER SERVICE SECTION
A per-failover-service section starts with failover service-name {
}where the service-name is a unique identifier. The following items are required for each failover service entry in the config file. address = a.b.c.d dev:x This is the address and device interface to be used for the virtual service. vip_nmask = a.b.c.d Optional. The netmask to apply to the service address. active = [0|1] This flag is used to indicate whether or not this particular virtual server is active. If it is marked inactive, then all real servers being routed to by it will by default become inactive as well. The following items are all optional entries (note the default values for many). timeout = This is the amount of time allowed before a service is presumed dead and will cause a failover. reentry = This is the amount of time that a previously dead partner system must be alive before it will be a candidate for possible failover. The purpose of this delay is to prevent troubled machines from causing a "ping-pong" effect. The default is 180 seconds. port = xx This is the port that the failover service is instructed to test. The default is port 80 (http). send = xxx If present, the specified text ("xxx") will be sent to the port of the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \\r, \\\\, or \\'". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted. expect = xxx If present, the specified text ("xxx") will be expected as a response from the port on the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \\r, \\\\, or \\'". Expect can also be a single '*' character to indicate any response characters are allowed. Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted. start_cmd = xxx Mandatory; specifies the startup command/script to execute to start the failover service. Options can be specified, but must be separated by a single space. stop_cmd = xxx Mandatory; specifies the shutdown command/script to execute to stop the failover service. Options can be specified, but must be separated by a single space.
SEE ALSOipvsadm(8), lvs(8), fos(8), pulse(8). sample.cf file
http://www.linuxvirtualserver.org 0
Johanes Gumabo
Data Size : 31,989 byte
man-lvs.cf.5Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 189,748
Visitor ID : :
Visitor IP : 3.147.51.72 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (rof_nr_x|149|lvs.cf.5|192|\n, \\r, \\\\, or \\'". |printable/quotable, and may contain "\\n, \\r, \\\\, or \\'".
) (rof_nr_x|149|lvs.cf.5|207|\n, \\r, \\\\, or \\'". |printable/quotable, and may contain "\\n, \\r, \\\\, or \\'".
) (rof_nr_x|149|lvs.cf.5|354|\n, \\r, \\\\, or \\'". |printable/quotable, and may contain "\\n, \\r, \\\\, or \\'".
) (rof_nr_x|149|lvs.cf.5|363|\n, \\r, \\\\, or \\'". |printable/quotable, and may contain "\\n, \\r, \\\\, or \\'".
)