I spend quite some time to change the original config of my MySQL cluster
and found out that the installation is quite a mess. 

 

1.      The data dir is /var/mysql for all nodes with a subdir with the
number of the server. So managementnode with ID 1 has a subdir of
/var/mysql/1/ 
2.      The management service expects the configuration file to be in
/opt/local/etc/mysql-cluster.ini

a.      I can live with that although one should expect it to be in
/var/mysql/ 

3.      When the managementserver starts with -initial it creates a backup
of the config, this is normal behaviour, in the same directory of the
config. 

a.      A file like /opt/local/etc/ndb_x_config.bin.1 is created, where x is
the ID of the management node
b.      This initial command is needed to create a fresh setup
c.      When executed from the commandline as root user the mysql management
server creates logfiles in /var/mysql/x/ directory with username root
d.      When executed from the commandline as mysql user the mysql
management server fails because it can not create the backupfile in
/opt/local/etc due to write rights

4.      After the initial start one has to stop the cluster and restart it
as a normal working cluster

a.      This can be done by the svcadm commands
b.      This will be executed as the MySQL user
c.      This will fail because the logs that were created in step 3 have the
root account rights
d.      After CHOWNing the files to user MySQL it will start

5.      At that time a NEW backupfile is created in
/opt/local/mysql-cluster/ 

a.      The backupfile in /opt/local/etc is neglected

 

 

6.      When you try to alter the config at a certain point in time (like I
did) and you have two management servers then things will break because:

a.      Running ndb_mgmd -reload from the commandline will recreate the
backupfile in /opt/local/etc/ 
b.      Starting the service via svcadm will read the old backupfile from
/opt/local/mysql-cluster/
c.      And then you will run in every possible cluster error that has been
documented, because both managementservers will be out of sync and will not
allow connection

 

 




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125
Powered by Listbox: https://www.listbox.com

Reply via email to