Rebuilding the Host With the Same IP Address

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

If you want to rebuild your existing node due to a disk or hardware failure, follow these steps to replace the node with the same 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 4.

  1. Login to the new host as root.
  2. Run “id dbadmin” to verify dbadmin user exists. If not, create the user with verticadba as a primary group.
  3. Install the vertica rpm using rpm -Uvh verticaxxx.rpm. (preferably place the rpm in /tmp location)
  4. Executeinstall_vertica -s locahost -r /tmp/verticaxx.rpm. This step fixes the file permission on folders in /opt/vertica directory.
  5. Switch to dbadmin user by running “su – dbadmin”.
  6. 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/id_rsa.pub
    c. ~/.ssh/ authorized_keys
  7. Once the passwordless SSH is fixed, ensure you are able to connect to and from other hosts in the cluster.
  8. 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.
  9. 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>';
  10. 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.
  11. 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.