LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Need help with ipvsadm- persistence

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Need help with ipvsadm- persistence
From: Horms <horms@xxxxxxxxxxxx>
Date: Fri, 5 Aug 2005 15:05:37 +0900
On Fri, Aug 05, 2005 at 11:12:44AM +0530, Vijay K wrote:
> Hi all,
> I have established two directors(with two NIC cards each and two virual
> addresses).
> I have used ipvsadm to configure two ports(80 and 443) on the two real
> servers.
> As of now I have not created the ldirectord.cf file.I plan to do it at a
> later time..I am able to access the real servesr from outside using teh
> virtual ip.I am using NAT..so the internal virtual ip of the directors is
> the gateway of the real servers.
> 
> The problem i face is that once the director systems reboots the configured
> real servers are not shown on #/sbin/ipvsadm.I ahve to manually do it
> again.Is there a way to ensure that the setup is persistent even after a
> reboot.

ipvsadm is a tool to convigure LVS in the kernel, much like
the way the ip command configures the kernel's neterfaces
and routing. And these parameters are all reset when
the kernel reboots, which is why your configuration goes away.

If you have /etc/init.d/ipvsadm, then this provides an easy way
to make sure your rules are reinstated on reboot.

After configuring your rules run /etc/init.d/ipvsadm save.
Then make sure that this init script is run on boot -
your distribution should have some way of doing this.


If you ever want to move over to having ldirectord or
some other tool manage ipvsadm, then just run

ipvsadm -C
/etc/init.d/ipvsadm save

Or better disable running of the ipvsadm init script at boot.
In any case, you use a tool like ldirectord, you need
to leave running ipvsadm up to that tool.

> I have another question..do we need thsi ipvsadm administration when we have
> a ldirectord.cf file

ipvadm is needed for ldirectord to function correctly.
But you should configure your cluster through the ldirectord.cf file,
rather than manually issuing ipvsadm commans.

You can, however, use ipvsadm -C and friends to query the
cluster regardless of how it is configured.

> Thanks in advance and I look forward to ur response.
> I am adding what the output of /sbin/ipvsadm look before and after a reboot.

[snip]

-- 
Horms

<Prev in Thread] Current Thread [Next in Thread>