Before you start the cluster, you choose what database features to use by specifying a configuration file when you initialize the database root directory on each node using the voltdb init command. You must specify the same configuration file on every node of the cluster. For example:
$ voltdb init --config=deployment.xml
If you choose to change database options, many of the features can be adjusted while the database is running by either:
Using the web-based Volt Management Center to make changes interactively in the Admin tab
Editing the original configuration file and applying the modifications with the voltadmin update command
For example, you can change security settings, import and export configurations, and resource limits dynamically. With either approach, the changes you make are saved by VoltDB in the database root directory.
However, there are some changes that cannot be made while the database is running. For example, changing the K-safety value or the number of partitions per server require shutting down, re-initializing, and restarting the database. To change these static aspects of your cluster, you must save the database contents, reconfigure the root directory, then restart and restore the database. The steps for changing static configuration options are:
Pause the database (voltadmin pause)
Save a snapshot of the contents (voltadmin save {path} {file-prefix})
Shutdown the database (voltadmin shutdown)
Re-initialize the root directory with the new configuration file and the --force
argument
(voltdb init --force --config=file)
Restart the database in admin mode (voltdb start --pause)
Restore the snapshot (voltadmin restore {path} {file-prefix})
Resume normal operations (voltadmin resume)
See Chapter 13, Saving & Restoring a VoltDB Database for information on using save and restore. When doing benchmarking, where you need to change the number of partitions or adjust other static configuration options, this is the recommended approach. However, if you are adjusting the size of the cluster to increase or decrease capacity or performance, you can perform these operations while the database is running. Adding and removing nodes "on the fly" is known as elastic scaling and is described in the next section.