ITPub博客

首页 > 数据库 > MySQL > 能否直接修改NoOfReplicas=2为NoOfReplicas=1

能否直接修改NoOfReplicas=2为NoOfReplicas=1

原创 MySQL 作者:denglt 时间:2014-03-13 16:49:22 0 删除 编辑

NoOfReplicas=2为时

Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @172.16.110.131  (mysql-5.6.15 ndb-7.3.4,  Nodegroup: 0, *)
id=4    @172.16.110.132  (mysql-5.6.15 ndb-7.3.4,  Nodegroup: 0)

修改config.ini文件中的NoOfReplicas=1,关闭cluster.

使用--initial启动ndb_mgmd.
启动数据节点:
ndb_mgm> 3 4 start
Node 3: Start initiated (version 7.3.4)
Node 3 4 is being started
ndb_mgm> Node 4: Start initiated (version 7.3.4)
Node 4: Forced node shutdown completed. Occured during startphase 1. Caused by error 2350: 'Invalid configuration received from Management Server(Configuration error). Permanent error, external action needed'.
Node 3: Forced node shutdown completed. Occured during startphase 1. Caused by error 2350: 'Invalid configuration received from Management Server(Configuration error). Permanent error, external action needed'.

看节点日志:
more ndb_4_error.log
Current byte-offset of file-pointer is: 568                      

Time: Thursday 13 March 2014 - 16:25:29
Status: Permanent error, external action needed
Message: Invalid configuration received from Management Server (Configuration error)
Error: 2350
Error data: Illegal configuration change. Initial start needs to be performed  when changing no of replicas (2 != 1)
Error object: DBDIH (Line: 4831) 0x00000002
Program: ndbmtd
Pid: 24328 thr: 0
Version: mysql-5.6.15 ndb-7.3.4
Trace: /data/mysql_ndb/ndb_4_trace.log.1 [t1..t5]

加 --initial启动数据节点

Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @172.16.110.131  (mysql-5.6.15 ndb-7.3.4, Nodegroup: 0, *)
id=4    @172.16.110.132  (mysql-5.6.15 ndb-7.3.4, Nodegroup: 1)

 

使用--initial参数后数据节点的所有数据丢失,实验失败。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/195110/viewspace-1116976/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-04

  • 博文量
    118
  • 访问量
    708487