Add a Node to the Data Repository Cluster
To increase system performance or replace a node, add a node to the Data Repository cluster.
You can increase system performance or replace a node by adding nodes to the data repository cluster.
This process applies to expanding a node that was set up with a hostname. If a node was set up using localhost, the nodes table in Vertica has node_address or node_ip set to 127.0.0.1. To expand a node that was set up using localhost, contact Broadcom Support.
In this article:
For more details about this process, see the Vertica documentation.
Complete the Prerequisites
Before you add the new node to the data repository cluster, complete the prerequisites:
- Stop the data aggregator by issuing the following command:service dadaemon stopKeep the data aggregator stopped until you complete the entire process.
- Prepare the new host for the data repository installation.For more information see, Prepare to Install the Data Repository.
- Back up the data repository.For more information, see Back Up the Data Repository.
Prepare the New Host
Before you add the host to the cluster, configure and validate the
Follow these steps:
- Copy theinstallDR.binfile to the/tmpdirectory on the new host.
- On the new host, extract the installation files from theBINfile by issuing the following command:./installDR.bin
- Configure thedrinstall.propertiesfile.The parameters must match the properties file from the original cluster. Copy thedrinstall.propertiesfile from an active node, and modify only the necessary parameters.
- DbAdminLinuxUserThe Linux user that is created to serve as the Vertica database administrator.Default:dradmin
- DbAdminLinuxUserHomeThe Vertica Linux database administrator user home directory.Default:/export/dradminThis directory is created if the Vertical installer creates the user. Be sure that the directory leading up to the home account already exists on the system. For example, if you are using/export/dradmin, verify that/exportexists.
- DbDataDirThe location of the data directory.Default:/data
- DbCatalogDirThe location of the catalog directory.Default:/catalog
- DbHostNamesThe names of the new hosts.
- DbNameThe database name.Default:drdataCase-sensitive:Yes
- DbPwdThe database password.Default:dbpassThe database password that you define here is used during the installation of data aggregator.
- Run the validation script by issuing the following command:./dr_validate.sh -p drinstall.propertiesThe validation script might ask you to reboot.
Add a Host to the Cluster
After you have prepared the new host, add the host to the cluster.
Use the same configuration for the new cluster as for the source cluster. For example, the Vertica version, node count, database name, administrator, user, catalog directory, and data directory must be the same as the original data repository.
Follow these steps:
- Log in to one of the existing data repository hosts.
- To add the host to the cluster, do one of the following tasks:
The script installs Vertica on the new host and incorporates the host into the cluster.If the database administrator user does not already exist, the installation script creates the user. The script prompts you to assign a new password. If the database administrator user exists, but passwordless SSH is not set up, the script prompts for the password to set up.
- If you have root access, issue the following command and specify the italic values:/opt/vertica/sbin/update_vertica --add-hostshostname-uDbAdminLinuxUser-lDbAdminLinuxUserHome-Llocation/resources/vlicense.dat --rpmlocation/resources/vertica-release.rpm-T -S default
- hostnameSpecify the name of the new host to add to the cluster.
- DbAdminLinuxUserThe database administrator user name for the cluster as specified in the properties file.
- DbAdminLinuxUserHomeThe database administrator user home directory.
- LocationThe location where you extractedinstallDR.binfile
- vertica-release.rpmThe current RPM file that exists in the extracted installation directory.
- If you do not have root access, issue the command as the sudo user:export SUDO_USER=root/opt/vertica/sbin/update_vertica --add-hostshostname-uDbAdminLinuxUser-lDbAdminLinuxUserHome-Llocation/resources/vlicense.dat --rpmlocation/resources/vertica-release.rpm-T -S default
- Ensure that the Vertica database administrator can write to the data and catalog directories by issuing the following commands:chownDbAdminLinuxUser.verticadbaDbDataDir DbCatalogDirchmod 755DbDataDir DbCatalogDirIf expanding from one node, segment the database after expansion is complete.For more information, see Segment Database Tables.
Add a Node to the Database
After you add the host to the cluster, add the node to the database. If you are adding multiple nodes to the cluster, prepare all nodes before you add any nodes to the database.
Follow these steps:
- Log in to any host in the cluster as the data repository administrator.
- Open the VerticaadminToolsutility by issuing the following command:/opt/vertica/bin/adminTools
- SelectAdvanced Menu, and then press theEnterkey on your keyboard.
- SelectCluster Management, and then press theEnterkey on your keyboard.
- SelectAdd Host(s), and then press theEnterkey on your keyboard.
- Select the database, and then press theEnterkey on your keyboard.The console displays a list of unused hosts.
- Select the new host, and then press theEnterkey on your keyboard.
- Confirm the selection, and follow the instructions in the console.The data repository adds the node to the cluster. This process can take a long time.
Create the Buddy Projection
Before you can make an expanded cluster k-safety of 1, you must create the buddy projection for the
- Log into vsql as thedradminuser.
- Issue the following command:select export_objects('/tmp/migration_status.sql', 'SCHEMA.migration_status');
- SCHEMADefines the schema, for example,dauser.
- Edit the/tmp/migration_status.sqlfile.
- Remove theCREATE TABLEdefinition and everything above it.
- Edit theCREATE PROJECTIONproperty as follows:
- Change the name frommigration_status_supertomigration_status_super_b1
- AfterALL NODESand before the semi-colon (;) addOFFSET 1
- Before theSELECT MARK_DESIGN_SAFEline, addSELECT START_REFRESH();
- Save themigration_status.sqlfile.
- Issue the following command:vsql -U dradmin -wdradminPassword-f /tmp/migration_status.sqlA prompt should confirm that the refresh background process has begun.
Update the Data Repository Configuration
On the data aggregator host, ensure that the
dbconnection.cfgfile points to the correct data repository hosts.
Follow these steps:
- Open the<data_aggregator_installation_directory>/apache-karaf-<version>/etc/dbconnection.cfg
- Modify the following line in thedbconnection.cfgfile. Modify the line to reference the hostname or IP address of each data repository host:dbHostNames=dbNode1Hostname,dbNode2Hostname,dbNode3Hostname
- Save thedbconnection.cfgfile.
- Do one of the following steps:
- Start the Data Aggregator service by issuing the following command:service dadaemon startFor RHEL 7.x or OL,serviceinvokessystemctl. You can usesystemctlinstead.
- (Fault-tolerant environment) Enable the fault-tolerant data aggregator so that it can start when necessary by issuingonethe following commands:
- RHEL 6.x:service dadaemon activate
- RHEL 7.x, SLES, or OL:<data_aggregator_installation_directory>/scripts/dadaemon activate