List:Cluster« Previous MessageNext Message »
From:Jon Stephens Date:October 23 2009 9:19pm
Subject:Re: --nowait-nodes being ignored.
View as plain text  
Richard McCluskey wrote:
> Andrew,
> 
> thanks for the quick reply, here is a follow up... :)
> 
> If I currently have NoOfReplicas set to 1, with one NDBD node, what will
> happen if I shut the cluster down set NoOfReplicas to 2, and restart the
> cluster with that node. Will the node self replicate, or will I lose all
> my data ? :)

Hi Richard,

I doubt that the cluster would even start.

Let D = the number of data nodes, and R = the number of replicas (i.e. 
NoOfReplicas). Then D / R must be a whole number. What you're suggesting is

D = 1, R = 2 --> D / R = 1 / 2 --> 100% not viable.

See 
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-noofreplicas

OTOH, if you performed your experiment but you added a second data node 
as well as increasing NoOfReplicas to 2. In this case, you'd have

D = 2, R = 2 --> D / R = 2 / 2 = 1 --> should be okay.

For this to work, you must (A) do a complete shutdown of all cluster 
nodes; and (B) start both data nodes using the --initial option.

cheers

jon.

> 
> Richard
> 
> On Fri, 2009-10-23 at 20:46 +0100, Andrew Hutchings wrote:
>> Hello Richard,
>>
>> On Fri, 2009-10-23 at 15:34 -0400, Richard McCluskey wrote:
>>> Can anyone explain to me why I get problems when I have 2 ndbd nodes,
>>> and NoOfReplicas=1 and I try to start one of the ndbd nodes with :
>>>
>>> ndbd --initial -v --nowait-nodes=other_node
>> With NoOfReplicas=1 you need both nodes started to form the cluster, so
>> it is impossible for the cluster to start in the way you have asked it
>> to.  Therefore you see an error stating that there are not enough nodes
>> to start a cluster (it needs a minimum of 2).
>>
>> To fix this either set NoOfReplicas=2, reduce down to 1 ndbd node or do
>> not use --nowait-nodes.
>>
>> Kind Regards
> 


-- 


Jon Stephens - jon.stephens@stripped
Technical Writer
MySQL Documentation Team
Sun Microsystems AB
MySQL and Software Infrastructure Group
Liljeholmen (Stockholm), Sweden
Summer: UTC +02.00 / Winter: UTC +01.00
Mobile: +46 (0) 736 773 993
Skype: plastic-fish
MySQL: www.mysql.com
Sun: www.sun.com

Thread
--nowait-nodes being ignored.Richard McCluskey23 Oct
  • Re: --nowait-nodes being ignored.Andrew Hutchings23 Oct
    • Re: --nowait-nodes being ignored.Richard McCluskey23 Oct
      • Re: --nowait-nodes being ignored.Andrew Hutchings23 Oct
      • Re: --nowait-nodes being ignored.Jon Stephens23 Oct