Re: [ilugd] How to run script on other machine if ping breaks?

2010-02-06 Thread Ashish SHUKLA
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amit Sharma writes:
 Hi,

 I have 2 linux servers A and B. 

 Both are running MySQL and A is defined as Master and B as Slave.


 A ipaddress is 10.10.10.10 and B has 10.10.10.50

 Now, in case A goes down due to any reason, I would like that B gets ip 
 address 10.10.10.10 so that the application run without any issues.

 I have created the script for ip change and other setting but would like to 
 know how to run it on B at the time when B is unable to get ping request from 
 A for say 5 minutes.

What you need is a failover cluster. Heartbeat[1] is the way to go.

References:
[1]  http://linux-ha.org/wiki/Main_Page
- -- 
They who can give up essential liberty to obtain a little temporary safety,
deserve neither liberty nor safety.
  -- Benjamin Franklin, Memoirs of the life and writings of Benjamin Franklin
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkttQZQACgkQHy+EEHYuXnSdewCeLoAb0BY9bnta+kmfAD4aK0D3
FnEAni9GB6u5tyE/96W5+IkhyP5Rpjmx
=AdTA
-END PGP SIGNATURE-

___
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd


Re: [ilugd] How to run script on other machine if ping breaks?

2010-02-06 Thread PJ
Amit Sharma amit_...@... writes:

 I have created the script for ip change and other setting but would like to
know how to  run it on B at the time
 when B is unable to get ping request from A for say 5 minutes.

If you want to keep it lightweight instead of bringing in the heartbeat
framework, you can script something up based on the ping response itself.

ping -c1 ip.address.of.A || do_ip_change_etc

You'll have to run it in a loop. And think of the sleep time between pings, and
number of ping fails before you switch.

PJ



___
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd


[ilugd] How to run script on other machine if ping breaks?

2010-02-05 Thread Amit Sharma
Hi,

I have 2 linux servers A and B. 

Both are running MySQL and A is defined as Master and B as Slave.


A ipaddress is 10.10.10.10 and B has 10.10.10.50

Now, in case A goes down due to any reason, I would like that B gets ip address 
10.10.10.10 so that the application run without any issues.

I have created the script for ip change and other setting but would like to 
know how to  run it on B at the time when B is unable to get ping request from 
A for say 5 minutes.

Please help.

regards,
amit



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/
___
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd