Hi,
I was hoping somebody could help me understand what is going on.
Today I created my first MySQL cluster.
I have 3 servers.
1. the manager running ndb_mgmd and mysqld
2. a server running ndbd
3. a server running ndbd
Here is my config on the manager server that ndb_mgmd is started with
[NDBD DEFAULT]
NoOfReplicas= 2
DataDir= /var/lib/mysql-cluster
[NDB_MGMD]
Hostname=ip-manager.eu-west-1.compute.internal
DataDir= /var/lib/mysql-cluster
[NDBD]
Hostname=node1.eu-west-1.compute.internal
[NDBD]
Hostname=ip-node2.eu-west-1.compute.internal
[MYSQLD]
Hostname=ip-manager.eu-west-1.compute.internal
The good news is, both nodes and the manager seem to be communicating as the manager knows that they exist
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @node1 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0)
id=3 @node2 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @manager (mysql-5.5.29 ndb-7.2.10)
[mysqld(API)] 1 node(s)
id=4 @manager (mysql-5.5.29 ndb-7.2.10)
My confusion starts here. I connect to mysql on the manager and run the following.
mysql> create database cluster_db;
Query OK, 1 row affected (0.06 sec)
mysql> create table cluster_db.t1 (a int) engine=NDBCLUSTER;
Query OK, 0 rows affected (0.31 sec)
insert into cluster_db.t1 VALUES (1), (100), (1000);
I can now do a select * and everything looks ok. I can also find the cluster_db directory on the manager server. All good so far.
However, when I look on the nodes running ndbd, I cannot find any data directories and the file timestamps in the datadirs are not updated. It looks like nothing has been written to the file system of the data nodes.
ubuntu@ip-10-58-50-83:/var/lib/mysql-cluster$ ls
ndb_2_fs ndb_2_out.log ndb_2.pid ndbd ndbmtd
My questions are :
Should I only be seeing the cluster_db directory on the server running mysqld?
Should I see any files updated on the nodes when I run select queries?
If the data is only stored on the server running mysqld, is this single point of failure?
Many thanks!
John
I was hoping somebody could help me understand what is going on.
Today I created my first MySQL cluster.
I have 3 servers.
1. the manager running ndb_mgmd and mysqld
2. a server running ndbd
3. a server running ndbd
Here is my config on the manager server that ndb_mgmd is started with
[NDBD DEFAULT]
NoOfReplicas= 2
DataDir= /var/lib/mysql-cluster
[NDB_MGMD]
Hostname=ip-manager.eu-west-1.compute.internal
DataDir= /var/lib/mysql-cluster
[NDBD]
Hostname=node1.eu-west-1.compute.internal
[NDBD]
Hostname=ip-node2.eu-west-1.compute.internal
[MYSQLD]
Hostname=ip-manager.eu-west-1.compute.internal
The good news is, both nodes and the manager seem to be communicating as the manager knows that they exist
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @node1 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0)
id=3 @node2 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @manager (mysql-5.5.29 ndb-7.2.10)
[mysqld(API)] 1 node(s)
id=4 @manager (mysql-5.5.29 ndb-7.2.10)
My confusion starts here. I connect to mysql on the manager and run the following.
mysql> create database cluster_db;
Query OK, 1 row affected (0.06 sec)
mysql> create table cluster_db.t1 (a int) engine=NDBCLUSTER;
Query OK, 0 rows affected (0.31 sec)
insert into cluster_db.t1 VALUES (1), (100), (1000);
I can now do a select * and everything looks ok. I can also find the cluster_db directory on the manager server. All good so far.
However, when I look on the nodes running ndbd, I cannot find any data directories and the file timestamps in the datadirs are not updated. It looks like nothing has been written to the file system of the data nodes.
ubuntu@ip-10-58-50-83:/var/lib/mysql-cluster$ ls
ndb_2_fs ndb_2_out.log ndb_2.pid ndbd ndbmtd
My questions are :
Should I only be seeing the cluster_db directory on the server running mysqld?
Should I see any files updated on the nodes when I run select queries?
If the data is only stored on the server running mysqld, is this single point of failure?
Many thanks!
John