Configuration

You have already seen how to produce a basic configuration for a cluster. However, you will almost certainly find that you want to specify some, if not all, of the optional configuration settings; this chapter explains what they all do.

All these settings go in the config.ini file, which is often placed in the DataDir of the management node (conventionally /var/lib/mysql-cluster). If you change this file, you will have to completely restart the cluster either following a process very similar to that of an online upgrade (as described in Chapter1, "Installation") or, by doing a backup, a total cluster shutdown, and a re-import.

Note

Technically, the config.ini file can go anywhere, as long as you are in that directory when you start the management daemon (ndb_mgmd). However, we strongly suggest that you keep it on your DataDir, where all the other files that the management daemon will create (such as log files) will go.

To do a rolling online configuration change, you follow these steps:

1.

Change the configuration file as desired (for example, increase DataMemory).
 

2.

Stop your management daemon by using <id> STOP, where <id> is the ID of the management node, as displayed in the management client (ndb_mgm).
 

3.

Start your management daemon.
 

4.

Carry out the following process for each storage node (one node at a time):
 

Note

You can do more than one storage node at a time. The actual restriction is that you must have one node per node group remaining up at all times, but we don't suggest that you do this because if you change only one node at a time, (a) if it goes wrong, you have only one node down and (b) you know exactly which node is causing problems.

  • Stop the storage node by using <id> STOP, where <id> is the ID of the storage node, as displayed in the management client.
  • Start the storage node by using ndbd --initial. The --initial option is required only for certain parameters; however, it is always safe to use (it may just make the restart take slightly more time). This is where the upgrade actually takes place; in other words, when the node starts, it is upgraded.
  • Wait for the storage node to fully start before moving on to the next node. To determine that it is done, look at the results of a SHOW command in the management client.

The parameters that require the --initial option for the ndbd restart are ones that change the on-disk format, such as NoOfFragmentLogFiles, but it is always safer to use it. There is no disadvantage except for a small increase in the time the node takes to restart.

To do a backup and restart, you follow these steps:

1.

Make a backup of the cluster.
 

2.

Shut down the entire cluster.
 

3.

Restart all the nodes by using the --initial option.
 

4.

Reimport your backup.
 

Luckily, there aren't very many parameters that require a process this severe. This process is required only when an option change requires the data to be partitioned in a different fashion. The following changes require this:

  • Changing NoOfReplicas
  • Adding/removing data nodes

This chapter is split into several sections: one that covers configuration options that apply to all nodes, one that covers management nodes, one that covers storage nodes, and one that covers SQL nodes. Each of these sections covers the options that can be used as defaults for all nodes of that type.

It is worth pointing out that the parameter names in MySQL Cluster are no longer case-sensitive. In older versions of 4.1, all the parameters were case-sensitive. So, for example, you can specify Id=3 or ID=3 or id=3, and they will all work the same.



MySQL Clustering
MySQL Clustering
ISBN: 0672328550
EAN: 2147483647
Year: N/A
Pages: 93

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net