Replacing the Host With New IP Address
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.
- Login to the database and run the following command:
ALTER NODE <failed Node name> hostname '<NEW_IPADDRESS>' control hostname '<NEW_IPADDRESS>';
- 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.
- 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