<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=632154417-01062007>Sorry, forgot the error message in 
here.</SPAN></FONT></DIV>
<DIV><STRONG><FONT face=Tahoma size=2></FONT></STRONG> </DIV><FONT 
face=Arial color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma 
size=2><B>From:</B> linux-cluster-bounces@redhat.com 
[mailto:linux-cluster-bounces@redhat.com] <B>On Behalf Of </B>Robert 
Gil<BR><B>Sent:</B> Friday, June 01, 2007 1:43 PM<BR><B>To:</B> linux 
clustering<BR><B>Subject:</B> RE: [Linux-cluster] MySQL Failover / 
Failback<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><STRONG><FONT 
face=Tahoma size=2></FONT></STRONG><STRONG><FONT face=Tahoma 
size=2></FONT></STRONG><STRONG><FONT face=Tahoma 
size=2></FONT></STRONG><STRONG><FONT face=Tahoma 
size=2></FONT></STRONG><STRONG><FONT face=Tahoma size=2></FONT></STRONG><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma 
size=2><B>From:</B> linux-cluster-bounces@redhat.com 
[mailto:linux-cluster-bounces@redhat.com] <B>On Behalf Of </B>Jeff 
Stoner<BR><B>Sent:</B> Friday, June 01, 2007 1:21 PM<BR><B>To:</B> linux 
clustering<BR><B>Subject:</B> RE: [Linux-cluster] MySQL Failover / 
Failback<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007>Sounds like you've got several things happening all at 
once. If you are not using MySQL Cluster, then you will probably 
have an active/passive setup, in which MySQL will be running on only one 
node. If you are using MySQL Cluster, why are you using Redhat 
Cluster?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#008000 size=2><SPAN 
class=301264516-01062007><SPAN class=183483917-01062007>Yes, it is using mysql 
replication NOT mysql cluster. It is active / passive. One node is rw (master) 
the other is ro (slave).</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007>Replication? Are you referring to MySQL Replication? 
What is replicating where? Are the slaves a part of the Redhat Cluster? If you 
simply mean will replication "break" if MySQL fails over then no. Replication on 
the slave will retry connecting to the master (according to the connection retry 
settings in MySQL.) Also, you must use the Redhat Cluster-controlled IP when 
establishing replication and not the IP of any particular node (for obvious 
reasons.)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007>For my MySQL databases built on Redhat Cluster, I 
specify my service as follows:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007><service autostart="1" domain="mysql-fail-domain" 
name="mysql5-service"><BR>   <ip 
ref="10.2.2.2"/><BR>   <fs ref="mysqlfs"/><BR>   
<script ref="mysqld"/><BR></service><BR></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=301264516-01062007>The filesystem resource is a slice of SAN accessible by 
all nodes in the cluster. The script is a (modified) /etc/init.d/mysqld 
script.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=183483917-01062007><FONT face=Arial 
color=#008000 size=2>What does your resource section look like for the ip 
address? I keep getting the following errors (posted in another 
message)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=183483917-01062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=183483917-01062007><FONT face=Arial 
color=#008000 size=2>Jun  1 13:29:10 melpsjssdbs01 clurgmgrd[5346]: 
<notice> Starting disabled service mastervip<BR>Jun  1 13:29:10 
melpsjssdbs01 clurgmgrd[5346]: <notice> start on ip:192.168.2.100 returned 
1 (generic error)<BR>Jun  1 13:29:10 melpsjssdbs01 clurgmgrd[5346]: 
<warning> #68: Failed to start mastervip; return value: 1<BR>Jun  1 
13:29:10 melpsjssdbs01 clurgmgrd[5346]: <notice> Stopping service 
mastervip<BR>Jun  1 13:29:10 melpsjssdbs01 clurgmgrd[5346]: <notice> 
Service mastervip is recovering<BR>Jun  1 13:29:10 melpsjssdbs01 
clurgmgrd[5346]: <warning> #71: Relocating failed service 
mastervip<BR>Jun  1 13:29:11 melpsjssdbs01 clurgmgrd[5346]: <warning> 
#70: Attempting to restart service mastervip locally.<BR>Jun  1 13:29:11 
melpsjssdbs01 clurgmgrd[5346]: <notice> Recovering failed service 
mastervip<BR>Jun  1 13:29:11 melpsjssdbs01 clurgmgrd[5346]: <notice> 
start on ip:192.168.2.100 returned 1 (generic error)<BR>Jun  1 13:29:11 
melpsjssdbs01 clurgmgrd[5346]: <warning> #68: Failed to start mastervip; 
return value: 1<BR>Jun  1 13:29:11 melpsjssdbs01 clurgmgrd[5346]: 
<notice> Stopping service mastervip<BR>Jun  1 13:29:11 melpsjssdbs01 
clurgmgrd[5346]: <notice> Service mastervip is 
stopped<BR></FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>--Jeff<BR><BR>Service Engineer<BR>OpSource Inc.<BR><BR>"The 
Message of the Day is /etc/motd"<BR></FONT></P>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><FONT face=Arial 
color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><FONT 
face=Arial color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff 
size=2></FONT><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <BR></DIV>
  <DIV></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>I am curious if 
  anyone knows the best practices for this? Several use cases 
  include</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>Note: We are 
  choosing to use a vip for the two nodes to make the failover change 
  transparent to the application side.</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>1) Node 1 (master) 
  dies</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial 
  size=2>        -How do we enable "sticky" 
  failover so that it does not then fail back to Node 1</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial 
  size=2>        -Is Node 2 active all the 
  time or is the service completely shut off? And if its off, how would 
  replication happen?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007>        
  <FONT face=Arial size=2>-How do failover domains work in this 
  case?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>2) Node 2 (Master) 
  Node 1 recovered</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007>        
  <FONT face=Arial size=2>-How does replication continue 
  again?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007>        
  <FONT face=Arial size=2>-How does the master slave relationship change? Is 
  this automated, or does it require manual intervention? Should we be using 
  DRDB?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>3) Node 1 (master) 
  Node 2 (slave) - network connectivity dies on node 1</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007>        
  <FONT face=Arial size=2>-There is an IP resource available, but how does this 
  monitor and handle failover?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007>        
  <FONT face=Arial size=2>-How can I move the vip in the event of a failure? Do 
  I need to manually script this?</FONT></SPAN></DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=924030814-01062007><FONT face=Arial size=2>With the vip 
  failover, do I attach the vip resource to the mysql resource in the failover 
  domain for those two nodes? What happens if I do this?</FONT></SPAN></DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>