Randy Paries <rtparies@xxxxxxxxx> wrote:
> hello,
> by using i am changing the weighting of my servers
>
> ipvsadm -e -t www.unitnet.com:80 -r local.krusty:80 -w 2
> ipvsadm -e -t www.unitnet.com:80 -r local.flanders:80 -w 3
>
> How do i make this permanent?
Like most commands that modify kernel parameters,
LVS settings made using ipvsadm are lost at reboot.
So the idea is not to save them permanantly, but rather,
make sure that the commands are re-run at reboot.
There are a variety of ways to do this. Perhaps
the simplest is to use the ipvsadm init script.
If you make sure that it gets run at boot (like
any other init script) then all you need to do,
after setting up your rules as you have done above,
is run.
/etc/init.d/ipvsadm save
Alternatively, you can use a tool like keepalived or ldirectord,
that will manage the IPVS configuration using a configuration
file and monitoring of the real servers.
--
Horms
|