Change Vertica cluster ip address

These instructions assume you have already made the standard OS changes to change the IPs (for example, updating /etc/hosts). These instructions detail only the Vertica-specific IP changes. To change the IP address of one or more nodes in a cluster: Backup the following three files:

    ?/opt/vertica/config/admintools.conf
    ?/opt/vertica/config/vspread.conf
    ?/etc/sysconfig/spreadd
	
  • 1. Stop Vertica on all nodes.
  • 2. As root, on each node stop spread by using the following command:
  •     /etc/init.d/spreadd stop
  • 3. On each node edit /opt/vertica/config/admintools.conf and change the IPs as required.
  • You can use sed to change each IP in the file, for example to change 10.10.10.81.82 to 192.168.150.108 issue the command:
        sed -i 's/10.10.81.8/192.168.150.108/g' /opt/vertica/config/admintools.conf
  • 4. On each node edit /opt/vertica/config/vspread.conf:
  • a. Change the old IPs to the new IPs as required. b. Locate the N number for each IP and change it to match the new IP. For example, if the old IP is 10.10.81.8, then the corresponding N number is N010010081008. N numbers consist of 3 digits for each IP number segment, padded with zeros when appropriate (10 becomes 010, 8 become 008, etc.). If the new IP address is 192.168.150.255, then the new corresponding N number is N010010081009.
  • 5. On each node edit /etc/sysconfig/spreadd and change the N numbers to the new N numbers as you changed in vspread.conf.
  • 6. As root, on each node start spread by using the following command:
  •     /etc/init.d/spreadd start
  • 7. Start a single Vertica node and run vsql.
  • 8. In vsql, issue the following query to verify the new IP has been updated:
  •     select host_name from host_resources;
    You can also verify IPs with the following shell commands:
        ?cat /var/log/spreadd.log
        ?admintools -t list_host
        ?cat /etc/hosts
    1. Modify the database to use the new IPs for reporting node status:
    • In vsql, issue the command select node_name, node_address from v_catalog.nodes; to show you the current node names configured.
    • For each result, update the IP address by issuing the command: alter node NODE_NAME is hostname 'new.ip.address'; where NODE_NAME is the node_name and new.ip.address is the new IP of that node. Note: the node must be down to change the IP using the alter node command. You can change all the IPs for the cluster from the first node if only the first node is up, then bring down the first node and bring up another node to change the IP of the first node.
  • Bring up all nodes in the cluster.
  • Example
        sed -i 's/old ip/new ip/g' /opt/vertica/config/admintools.conf
        sed -i 's/old ip/new ip/g' /opt/vertica/config/vspread.conf
        sed -i 's/old ip/new ip/g' /opt/vertica/config/vspread.conf
        sed -i 's/old ip/new ip/g' /etc/sysconfig/spread
    Start the spread on all nodes now Then start vertica only on one node and alter the host ip adress in the
        alter node v_cluster_node0001 is hostname '10.253.1.79';