master 現在是node3
[root@node3 ~]# ndb_mgm -e show
Connected to Management Server at: 10.0.0.101:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @10.0.0.103  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0, Master)
id=4    @10.0.0.104  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.0.0.101  (mysql-5.1.44 ndb-7.1.4)

[mysqld(API)]   1 node(s)
id=2    @10.0.0.102  (mysql-5.1.44 ndb-7.1.4)

試試模擬node3的ndbd掛掉的時候看看會怎樣
[root@node3 ~]# killall ndbd

node4接手變成master了
[root@node3 ~]# ndb_mgm -e show
Connected to Management Server at: 10.0.0.101:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3 (not connected, accepting connect from 10.0.0.103)
id=4    @10.0.0.104  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.0.0.101  (mysql-5.1.44 ndb-7.1.4)

[mysqld(API)]   1 node(s)
id=2    @10.0.0.102  (mysql-5.1.44 ndb-7.1.4)

重啟在node3啟動ndbd後會怎樣咧??
[root@node3 ~]# ndb_mgm -e show
Connected to Management Server at: 10.0.0.101:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @10.0.0.103  (mysql-5.1.44 ndb-7.1.4, starting, Nodegroup: 0)
id=4    @10.0.0.104  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.0.0.101  (mysql-5.1.44 ndb-7.1.4)

[mysqld(API)]   1 node(s)
id=2    @10.0.0.102  (mysql-5.1.44 ndb-7.1.4)

[root@node3 ~]# ndb_mgm -e show
Connected to Management Server at: 10.0.0.101:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @10.0.0.103  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0)
id=4    @10.0.0.104  (mysql-5.1.44 ndb-7.1.4, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.0.0.101  (mysql-5.1.44 ndb-7.1.4)

[mysqld(API)]   1 node(s)
id=2    @10.0.0.102  (mysql-5.1.44 ndb-7.1.4)

嗯.. 結論是..node4繼續當他的master ... (筆記)

helloworld 發表在 痞客邦 PIXNET 留言(0) 人氣()