Replacing the Host With New IP Address

AmakshAmaksh Vertica Employee Employee
edited September 2020 in Tips from the Team

If you are using Vertica 9.3 and higher or both the nodes are reachable, follow these steps to replace your host in the Vertica Documentation:

If you are using a version prior to 9.3 and the node with the old IP address is not reachable, follow these steps to replace the host with the new IP address. In these steps we have used dbadmin user as the database administrator. If you have a different user for database administrator, edit the script accordingly and pass –u to install_vertica command in step 6.

  1. Login to the database and run the following command:
    ALTER NODE <failed Node name> hostname '<NEW_IPADDRESS>' control hostname '<NEW_IPADDRESS>';
    Select reload_spread(true);
  2. Replace the old_ipaddress with new_ipaddress in /opt/vertica/config/admintools.conf file on a good node. Use configuration options to distribute admintools.conf file to all nodes in the cluster.
  3. Login to the new host as root.
  4. Run “id dbadmin” to verify dbadmin user exists. If not, create the user with verticadba as a primary group.
  5. Install the vertica rpm usingrpm -Uvh verticaxxx.rpm. (preferably place the rpm in /tmp location)
  6. Execute install_vertica -s locahost -r /tmp/verticaxx.rpm. This step fixes the file permission on folders in /opt/vertica directory.
  7. Switch to dbadmin user by running “su – dbadmin”.
  8. SSH to any other host in the cluster as dbadmin. If passwordless SSH is not setup, copy the following three files from any other node to the ~/.ssh/ folder and ensure permissions are identical to other nodes:
    a. ~/.ssh/id_rsa
    b. ~/.ssh/
    c. ~/.ssh/ authorized_keys
  9. Once the passwordless SSH is fixed, ensure you are able to connect to and from other hosts in the cluster.
  10. On a good host open admintools and use configuration options to distribute admintools.conf file and database configuration file to all nodes in the cluster.
  11. Get a list of data, catalog, and other storage locations if any exist by running the following query:
    select storage_path, storage_usage from disk_storage where node_name ilike '<down node name>';
  12. Connect to the new host as dbadmin and create directories using the output from the above query “mkdir -p storage_path” .
    Note: Ensure permissions and ownership of these directories match other nodes.
  13. From a good host, use admintools command line to restart the node that is down with force flag:
    /opt/vertica/bin/admintools -t restart_node -d dbname -s down_node_ipaddress -F
Sign In or Register to comment.