rc.lvs Configure scripts and Director Failover

Joseph Mack mack.joseph at epa.gov
Fri May 24 15:03:31 BST 2002

> Okay assume the LVS is running having been set up using the rc.lvs_dr from
> one of the directors.
> Now the second director has a different config file as the director IP is
> different.
No. There is only one rc.lvs_dr file and it has a list
of the director and realserver names (or IP's depending on
what you've used in the conf file). The rc.lvs file checks the
name/IP of the machine it's running on and then looks up the list
to see whether it should configure itself as a director or
realserver and then does the Right Thing (TM).

> Does this other rc.lvs_rc need to be ran on the realservers when the
> directors failover?
No. The realservers have been setup to have a VIP, know what the DIP is,
and to route to a gw. None of these IPs change when a director fails over.
The new director comes up with the same VIP and DIP and the realserver
doesn't see that anything has changed.
Well not quite. The DIP will have a new MAC address and for a few seconds
after the changeover, packets sent to the DIP will be using the wrong MAC
address, which comes from the arp table in the realserver. If you don't mind
the pause, then the realserver will figure everything out soon enough. The
usual thing on director failover is for the machine that has just taken over
the VIP and DIP to do an arp broadcast (using sendip, or sendarp, forget which)
which flushes the arp entries for those IPs in machines on that network.
The vrrpd for LVS which Alexandre Cassen is writing has a smarter scheme. The VIP and DIP
instead of being secondary IPs on an ethernet card and hence using the same MAC
address as the primary IP on the NIC, are given their own MAC address from the
private MAC address range (the MAC equivelent of, and so when
the VIP/DIP move to a new machine, it comes up with the MAC address it
had on the other machine.
> I tried killing the main director, rebooted it, the directors failed over ok
> and the LVS continued to work, but my question is should they have bearing
> in mind the rc.lvs_dr script still active on the realservers was the one
> generated on direcotor1.
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center, 
mailto:mack.joseph at epa.gov ph# 919-541-0007, RTP, NC, USA

More information about the lvs-users mailing list