33.3 Adding Database Nodes

For high availability and to manage the workload, you can add additional nodes after the installation.

If you had installed database on a single node by specifying the loopback address, you cannot expand the cluster by adding nodes. To add nodes, you must uninstall and reinstall the database node by specifying an IP address or hostname. For more information, see Setting Database Properties.

For adding database nodes, you must first add the hosts to the cluster and then add them as nodes to the database.

To add nodes to the database:

  1. Log in as root to the database cluster node where the database installer is available.

  2. Stop the Kafka scheduler by using the command:

    <database-installer-dir>/kafka_scheduler stop

  3. Add hosts to the cluster by using the command:

    /opt/vertica/sbin/update_vertica --add-hosts <new_host1>,<new_host2>,<new_host3> --rpm <database_rpm_pkg_location> --dba-user <user_name> --dba-group <group_name> --dba-user-password-disabled --data-dir=<data_dir_location>

    For example:

    /opt/vertica/sbin/update_vertica --add-hosts <new-host1>,<new-host2>,<new-host2> --rpm <database-installer-dir>/data/vertica-x.x.x.x.rpm --dba-user dbadmin --dba-group dbadmin --dba-user-password-disabled --data-dir=/opt/vertica/data

  4. Change the logged in user to a database administrator:

    su - dbadmin

  5. Add nodes to the database by using the command:

    admintools -t db_add_node -d investigate -p <db-admin_password> -s <new-host1>,<new-host2>,<new-host3>

  6. Re-balance data in the database and set the K-safe value by using the command:

    admintools -t rebalance_data -d investigate -k <k_safe_value> -p <db-admin_password>

    Valid K-safe values for highly available databases are 1 and 2. Databases without high availability do not have to be K-safe and can be set to 0. A K-safe 1 database must have at least three nodes. For more information about the K-safe value, see Designing for K-Safety.

  7. Start Kafka scheduler by using the command:

    <database-installer-dir>/kafka_scheduler start