Defining and Realigning Control Nodes on an Existing Cluster

This topic describes how to set up or change control node assignments on an existing cluster using a series of cluster management functions. It assumes you already know how many control nodes the cluster needs for failover safety. See Planning a Large Cluster Arrangement for more information.

If you are adding control nodes for the first time, run the Vertica installation script using the --large-cluster <integer> argument. See Installing Vertica with the Installation Script in Installing Vertica.

Setting up control nodes on an existing cluster makes the following changes to the cluster:

  • Configures the number of nodes that run spread.
  • Assigns each non-control cluster node to a control node.

  • Saves the new layout to the spread configuration file.
  • Redistributes data across the cluster to improve fault tolerance.

How to set up control nodes on an existing cluster

After you add, remove, or swap nodes on an existing cluster, perform the following steps. This procedure helps the cluster maintain adequate control messaging distribution for failover safety. For more details , see "Control node assignment/realignment" in Large Cluster Best Practices.

  1. As the database administrator, log in to the Administration Tools and connect to the database.
  2. Call the SET_CONTROL_SET_SIZE(integer) function with an integer argument that specifies the number of control nodes you want. For example, 4:

    => SELECT SET_CONTROL_SET_SIZE(4);
  3. Call the REALIGN_CONTROL_NODES() function without arguments:

    => SELECT REALIGN_CONTROL_NODES();
  4. Call the RELOAD_SPREAD(true) function to save changes to the spread configuration file:

    => SELECT RELOAD_SPREAD(true);
  5. After the RELOAD_SPREAD() operation finishes, log back in to the Administration Tools, and restart the database.
  6. Call the REBALANCE_CLUSTER() function to distribute data across the cluster:

    => SELECT REBALANCE_CLUSTER();

    You must run REBALANCE_CLUSTER for fault tolerance to be realized.

For more details about the functions used in this procedure, see Cluster Management Functions in the SQL Reference Manual.