On Thu, Mar 29, 2007 at 09:30:51PM -0700, Tanveer Chowdhury wrote:
> Finally I am going to implement it on my home PCs each with 2 NICS before 
> attempting it in production servers. One(eth0) is connected to DSL cable for 
> intenet and other(eth1) I will use for Local intranet connectivity.
> 
> PC1:  eth0: 10.0.16.111    eth0:0  10.0.16.115  eth1: 192.168.100.10
> PC2:  eth0: 10.0.16.113                                  eth1: 192.168.100.20
> 
> 10.0.16.115 will be my VIP. Questions: Do I have to define
> eth0:0 in PC1 or just declaring it in haresources file is ok.

Don't understand this one, but it is enough to just put it in the
haresources.

> Now suppose if someone pulls the cable of say, eth0 / eth1 of
> PC1 then PC2 will take over, RIGHT? 

That's what's called split brain, a very difficult thing to solve.
You want to make sure that there's always connectivity available
between the nodes. So, you put more than one connection.

> Now when PC2 takes over then it will start the services listed
> in this line masternode   IPaddr::10.0.16.115    httpd 
> 
> So instead of httpd I will write a startup script of my own with
> lots of ipconfig command and iptables rules in that scripts
> Start and Stop function and put it in init.d location.

That's not an optimal approach, i.e. lumping various stuff
together in such a way will give everybody headache. If you really
need special resources which are _not_ already available (you
should check that), then implement only them in separate scripts.
Heartbeat will be happy to deal with multiple resources, so you
can do sth like:

    masternode   IPaddr::10.0.16.115    firewall mega-ip httpd 

> The
> purpose of this is when PC2 takes over its IP will be changed to
> eth0: 10.0.16.113 and eth1: 192.168.100.10.

eth1? I don't see eth1 in resources.

> These IP s will be
> static IPs so I think no problem will arise.  And Alan, sorry I
> couldn't make use of your that flash tutorial. Actually I didn't
> understood that clearly.

It was probably for v2 style configs.

> Waiting for your suggestions.

Always happy to help, but perhaps you should also invest some time
and read a few docs. You can start here:

http://linux-ha.org/GettingStartedWithHeartbeat

> 
> Dejan Muhamedagic <[EMAIL PROTECTED]> wrote: On Wed, Mar 28, 2007 at 
> 07:10:58AM -0700, Tanveer Chowdhury wrote:
> > hey thanks. The problem is I m not in the position to install any GUI to 
> > setup this.
> 
> You don't need to install a GUI on the cluster itself, just on
> your workstation, or any computer which would be able to access
> some cluster node on some TCP port.
> 
> > Further I failed to match the link with my scenario. May be too
> > dumb to understand that.
> 
> I didn't see what Alan prepared, but then I could well imagine
> that it does have something to do with where you're trying to get.
> 
> > Anyway one thing also to ask if any
> > interface gets down but the services are ok on master then how
> > come the slave will take over?
> 
> A network interface is a resource. A service (or what you presume
> to be a service) is also a resource. To heartbeat both are the
> same. A failing interface is the same as a failing service, i.e.
> it's a failed resource.
> 
> > Alan Robertson  wrote: Tanveer Chowdhury wrote:
> > > Hi all: Thank you for all your help and support. This is what I am
> > > going to do after reading carefully the documentation.
> > > 
> > > Server PC will have 3 NICS and all three NICS with real IP. Only one
> > > NIC is aliased to support blocks of internal private network to
> > > access Internet. You already know what scenario I am trying to
> > > achieve here and also attached the document that I will follow with a
> > > little modification to server my purpose.  My slave has also 3 NICS
> > > and will make an exact of IPs as it was in server when master server
> > > fails.
> > > 
> > > 
> > > Now my steps are as follows: As heartbeat only looks for services
> > > which can be start/stop using service command so I made a service
> > > script and put it in /etc/rc./init.d and it works. Below is the
> > > script: [b] #!/bin/sh # /etc/init.d/ha #
> > > 
> > > #some things that run always touch /var/lock/ha
> > > 
> > > #carry out specific functions when asked to by the system
> > > 
> > > case "$1" in start) echo " starting ha script to Change IP of Slave" 
> > > ifconfig eth0 192.168.100.11 netmask 255.255.255.0 up ...//all the ip
> > > change command will write here and also iptbales rules one by one ;;
> > > 
> > > stop) echo " starting ha script to change IP back" # ifconfig eth0
> > > 192.168.100.10 netmask 255.255.255.0 up ...//change all the ip change
> > > command will write here and also iptbales rules one by one ;;
> > > 
> > > *) echo "Usage:: /etc/init.d/ha {start | stop}" exit 1 ;; esac exit 0
> > >  [/b]
> > > 
> > > Now this script has all the IP configuration and will put this on
> > > both master and slave so when Master start it will set the IP as
> > > required and when master fails and stops the service then actually
> > > executes the stop fucntion and slave takes over the virtual IP and
> > > executes this script again setting the same IP configuration like
> > > master though initially slave had a diff IP settings than master. AM
> > > I right?
> > > 
> > > What you think of this? Will this work or I m making some move ? 
> > > Please let me know. Waiting for your kind response.
> > 
> > 
> > Why don't you just use our IPaddr resource that we already supply?
> > 
> > Here's how to configure IPaddr (IPaddr2) using the GUI:
> >  http://wiki.linux-ha.org/Education/Newbie/IPaddrScreencast
> > 
> > Hope that helps...
> > 
> > -- 
> > Alan Robertson 
> > 
> > "Openness is the foundation and preservative of friendship... Let me
> > claim from you at all times your undisguised opinions." - William
> > Wilberforce
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> > 
> > 
> >  
> > ---------------------------------
> > Don't be flakey. Get Yahoo! Mail for Mobile and 
> > always stay connected to friends.
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> 
> -- 
> Dejan
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
> 
> 
>  
> ---------------------------------
> 8:00? 8:25? 8:40?  Find a flick in no time
>  with theYahoo! Search movie showtime shortcut.
-- 
Dejan
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to