Saturday, August 30, 2008

status of create/drop node(group)

create/drop nodegroup now works with one noticeable exception
replication cant be connected while the nodegroup is added.
i'll try to find time to fix this next week.

- start a 2 node cluster
- create table T1
- stop ndb_mgmd, add 2 nodes, start ndb_mgmd
- either stop the 2 running nodes and restart all 4
or rolling restart the 2 running nodes, and then start the 2 new nodes
- ndb_mgm> create nodegroup n1,n2
- alter table T1 add partitions partitions 2

Tata! fully online scaling of the cluster

howto backwards:
- drop table T1
- ndb_mgm> drop nodegroup X
- ndb_mgm> n1,n2 stop -a
- stop ndb_mgmd, remove the 2 nodes, start ndb_mgmd
- either stop the 2 running nodes and restart them
or rolling restart them

(A nodegroup is allowed to be dropped if it does not contain any data)

side effect:
- I added the possibility to specify nodegroups per node in the config-file
(this I intend to use for testing, but maybe someone might find it interesting)

- magnus is working on "online configuration change" in the ndb_mgmd
once this is complete/functional, we can add the "add node"-command
so that the entire procedure can be done wo/ node restarts.



123 123 said...

Cool blog you got here. I'd like to read more concerning this theme. Thnx for posting this data.
Sexy Lady
Brunette escorts

Parry said...

Hi Jonas,

I have three nodegroups in my cluster. I want to drop third nodegroup. I had created one database only and there was only one table inside that database.

I tried to drop the third node group but I got the error message "ndb_mgm> drop nodegroup 2;
* 1006: Illegal reply from server
* error: -2

I dropped the table but still got above error, then I dropped the only database I had created but still getting same error.

I had shutdown all the nodes and restarted management server with --reload option and datanodes with --initial option but still getting same error and unable to drop node group.

Will appreciate your help on this.

ndb_mgm> show
Cluster Configuration
[ndbd(NDB)] 6 node(s)
id=3 @192.168.**.*3 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 0, Master)
id=4 @192.168.**.**4 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 0)
id=5 @192.168.**.**5 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 1)
id=6 @192.168.**.**6 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 1)
id=7 @192.168.**.**7 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 2)
id=8 @192.168.**.**8 (mysql-5.5.20 ndb-7.2.5, Nodegroup: 2)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.**.**1 (mysql-5.5.20 ndb-7.2.5)

[mysqld(API)] 54 node(s)
id=50 (not connected, accepting connect from 192.168.**.**3)
id=51 (not connected, accepting connect from 192.168.**.**4)
id=52 (not connected, accepting connect from 192.168.**.**5)
id=53 (not connected, accepting connect from 192.168.**.**6)