Newsgroup: it.comp.os.linux.sys
Titolo: Alta Affidabilità

Ho due server Linux RedHat 6.2, praticamente identici.
Ho provato ad attivare tramite lvs l'alta affidabilità, cioè la
possibilità di far stare un server UP e l'altro in STAND BY.
Precisamente ho usato la funzione fos (Failure of service), che dovrebbe
rilocare un servizio caduto sulla macchina master in quella di backup,
utilizzando un ip virtuale (es: eth0:1) che dovrebbe essere spostato da
una macchina all'altra.
Dico dovrebbe perche non funziona perfettamente, cioè sposta l'IP sulla
macchina secondaria ma non lo toglie dalla primaria, provocando un
conflitto di IP.
Qualcuno ha mai smanettato con l'alta affidabilità ho ha utilizzato
altri software per farlo ?
Allego il contenuto del file /etc/
lvs.cf
 che contiene tutte le regole da
appilcare.
========================================================
# This file is generated by the piranha GUI.  Do not hand edit.  All
# modifications created by any means other than the use of piranha will
# not be supported.
#
# This file has 3 sections. Section 1 is always required, then EITHER
# section 2 or section 3 is to be used.
#       1. LVS node/router definitions needed by the LVS system.
#       2. Virtual server definitions, including lists of real servers.
#       3. Failover service definitions (for any services running on the
#          LVS primary or backup node instead of on virtual servers).
#          NOTICE: Failover services are an upcoming feature of piranha
and
#          are not provided in this release.
# SECTION 1 - GLOBAL SETTINGS
#
# The LVS is a single point of failure (which is bad).  To protect
against
# this machine breaking things, we should have a redundant/backup LVS
node.
#       service:        Either "lvs" for Virtual Servers  or "fos" for
#                       Failover Services (defaults to "lvs" if missing)
#       primary:        The IP of the main LVS node/router
#       backup:         The IP of the backup LVS node/router
#       backup_active:  Set this to 1 if using a backup LVS node/router
#       heartbeat:      Use heartbeat between LVS nodes
#       keepalive:      Time between heartbeats between LVS machines.
#       deadtime:       Time w/ out response before node failure is
assumed.
service = fos
primary = 10.4.99.11
backup = 10.4.99.16
backup_active = 1
heartbeat = 1
heartbeat_port = 1050
keepalive = 6
deadtime = 18
# All nodes must have either appropriate .rhost files set up for all
nodes in
# the cluster, us use some equivalent mechanism. Default it rsh, but you
# may set an alternate command (which must be equivalent to rsh) here
(ssh
# is the most common).
rsh_command = rsh
# lvs server configuration environments: NAT, Direct Routing, and
Tunneling.
# NAT (Network Address Translation) is the simplist to set up and works
well
# in most situations.
#
# network = direct
# network = tunnel
network = nat
nat_router = 192.168.10.100 eth1:3
# SECTION 2 - VIRTUAL SERVERS
#
# Information we need to keep track of for each virtual server is:
# scheduler:    pcc, rr, wlc, wrr (default is wlc)
# persistent:   time (in seconds) to allow a persistent service
connection to
#               remain active.  If missing or set to 0, persistence is
turned
#               off.
# pmask:        If persistence is enabled, this is the netmask to apply.
#               Default is 255.255.255.255
# address:      IP address of the virtual server (required)
# active:       Simple switch if node is on or off
# port:         port number to be handled by this virtual server
(default
#               is 80)
# load_monitor: Tool to check load average on real server machines.
#               Possible tools include rup, ruptime, uptime.
# timeout:      Time (in seconds) between service activity queries
# reentry:      Time (in seconds) a service must be alive before it is
allowed
#               back into the virtual server's routing table after
leaving the
#               table via failure.
# send:         [optional] test string to send to port
# expect:       [optional] test string to receive from port
# protocol:     tcp or udp (defaults to tcp)
#
# This is the needed information for each real server for each Virtual
Server:
# address:      IP address of the real server.
# active:       Simple switch if node is on or off
# weight:       relative measure of server capacity
virtual server1 {
address = 10.4.99.20 eth0:1
active = 1
load_monitor = uptime
timeout = 5
reentry = 10
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
scheduler = wlc
persistent = 60
protocol = tcp
 server Real1 {
  address = 10.4.99.11
  active = 1
  weight = 1
 }
 server Real2 {
  address = 10.4.99.16
  active = 1
  weight = 1
 }
}
========================================================


VAi su 
linux-ha.org
 e usa heartbeat.
Piranah gestisce il load balance e il fos che usi č una piccola parte dle
pacchetto heartbeat pią completo, che prevede a sua volta la gestione del
linuxvirtualserver.
Inoltre devi usar eun indirzzo ip differente da quelli che hai sui due nodi,
deve essere un indirizzo virtuale, che poi rimbalzera fra i due nodi.
Io inizlamente usavo un indirzzo vero di una dell emacchien e avevo il tuo
stesso problema.