Rebuilding the Host With the Same IP Address
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.
- Login to the new host as root.
“id dbadmin”to verify dbadmin user exists. If not, create the user with verticadba as a primary group.
- Install the vertica rpm using
rpm -Uvh verticaxxx.rpm. (preferably place the rpm in /tmp location)
install_vertica -s locahost -r /tmp/verticaxx.rpm. This step fixes the file permission on folders in /opt/vertica directory.
- Switch to dbadmin user by running
“su – dbadmin”.
- 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:
c. ~/.ssh/ authorized_keys
- Once the passwordless SSH is fixed, ensure you are able to connect to and from other hosts in the cluster.
- 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.
- 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>';
- 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.
- 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