■ 管理ノードでクラスタをシャットダウン
[[email protected]nfj-mysqlmn2 ~]$ ndb_mgm -e shutdown
Connected to Management Server at: localhost:1186
4 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.
■ 作業前
[[email protected] ~]$ ls -al
合計 555000
drwx------ 4 mysql mysql 4096 8月 4 19:28 .
drwxr-xr-x 3 root root 4096 7月 10 2011 ..
-rw------- 1 mysql mysql 5061 7月 15 18:12 .bash_history
-rw-r--r-- 1 mysql mysql 33 7月 10 2011 .bash_logout
-rw-r--r-- 1 mysql mysql 193 9月 9 2011 .bash_profile
-rw-r--r-- 1 mysql mysql 124 7月 10 2011 .bashrc
-rw------- 1 mysql mysql 20 8月 4 19:02 .ndb_mgm_history
-rw------- 1 mysql mysql 3885 9月 10 2011 .viminfo
drwxrwxr-x 4 mysql mysql 4096 9月 9 2011 my_cluster
drwxr-xr-x 13 mysql mysql 4096 8月 21 2011 mysql-cluster-gpl-7.1.15a-linux-x86_64-glibc23
-rw-rw-r-- 1 mysql mysql 243405489 8月 21 2011 mysql-cluster-gpl-7.1.15a-linux-x86_64-glibc23.tar.gz
-rw-rw-r-- 1 mysql mysql 324288995 7月 17 02:50 mysql-cluster-gpl-7.2.7-linux2.6-x86_64.tar.gz
lrwxrwxrwx 1 mysql mysql 46 9月 9 2011 mysqlc -> mysql-cluster-gpl-7.1.15a-linux-x86_64-glibc23
■ シンボリックリンクを削除して張りなおして起動
[[email protected] ~]$ rm mysqlc
[[email protected] ~]$ rm -rf mysql-cluster-gpl-7.1.15a-linux-x86_64-glibc23
[[email protected] ~]$ tar xzf mysql-cluster-gpl-7.2.7-linux2.6-x86_64.tar.gz
[[email protected] ~]$ ln -s mysql-cluster-gpl-7.2.7-linux2.6-x86_64 mysqlc
[[email protected] ~]$ cd my_cluster/
[[email protected] my_cluster]$ ndb_mgmd -f conf/config.ini --configdir=/home/mysql/my_cluster/conf/
MySQL Cluster Management Server mysql-5.5.25 ndb-7.2.7
■ 設定
[[email protected] my_cluster]$ cat conf/config.ini
[ndb_mgmd default]
datadir=/home/mysql/my_cluster/ndb_data
[ndb_mgmd]
NodeId = 49
HostName=vm-nfj-mysqlmn1
[ndb_mgmd]
NodeId = 50
HostName=vm-nfj-mysqlmn2
[ndbd default]
NoOfReplicas=2
datadir=/home/mysql/my_cluster/ndb_data
[ndbd]
NodeId = 1
HostName=tk-oha-mysqlcn1
[ndbd]
NodeId = 2
HostName=tk-oha-mysqlcn2
[api]
NodeId = 51
HostName=tk-oha-mysqlcn1
[api]
NodeId = 52
HostName=tk-oha-mysqlcn2
[[email protected] my_cluster]$