Sometimes, nodes of an existing, operational Vertica database cluster require new IP addresses. Cluster nodes might also need to run based on different IP protocols—for example, when changing the protocol from broadcast to point-to-point.
Note
You cannot change from one address family—IPv4 or IPv6—to another. For example, if hosts in the database cluster are identified by IPv4 network addresses, you can only change host addresses to another set of IPv4 addresses.To change the IP addresses of hosts in your database cluster, use re_ip to map old addresses to the new ones, using the specified mapping file:
$ admintools -t re_ip -f mapfile
Use re_ip in the following cases:
-
If the Vertica database cluster has the same data and control messaging address, you can use
re_ipto remap database cluster node IP addresses:$ admintools -t re_ip -f mapfile -
Change the database cluster control messaging protocol:
From broadcast mode to point-to-point (unicast) mode:
$ admintools -t re_ip -d dbname -TFrom point-to-point (unicast) mode to broadcast mode:
$ admintools -t re_ip -d dbname -U -
Change the control address of the database cluster. In this case the mapping file must contain the control messaging IP address and associated broadcast address:
-
$ admintools -t re_ip -f mapfile -
Change database addresses without changing the admintools configuration.
Note
Database-only re-IP operations are useful for error recovery. Node names and IP addresses must be the same as the node information inadmintools.conf. You can query the system table NODES for node information.
re_ip and export IP address
By default, a node's IP address and its export IP address are identical. For example:
=> SELECT node_name, node_address, export_address FROM nodes;
node_name | node_address | export_address
------------------------------------------------------
v_VMartDB_node0001 | 192.168.100.101 | 192.168.100.101
v_VMartDB_node0002 | 192.168.100.102 | 192.168.100.101
v_VMartDB_node0003 | 192.168.100.103 | 192.168.100.101
v_VMartDB_node0004 | 192.168.100.104 | 192.168.100.101
(4 rows)
The export address is the IP address of the node on the network. This address provides access to other DBMS systems, and enables you to import and export data across the network.
If node IP and export IP addresses are the same, then running re_ip changes both to the new address. Conversely, if you manually change the export address, subsequent re_ip operations leave your export address changes untouched.
Finding IP addresses
IP addresses for the hosts and nodes are stored in opt/vertica/config/admintools.conf:
[Cluster]
hosts = 203.0.113.111, 203.0.113.112, 203.0.113.113
[Nodes]
node0001 = 203.0.113.111/home/dbadmin,/home/dbadmin
node0002 = 203.0.113.112/home/dbadmin,/home/dbadmin
node0003 = 203.0.113.113/home/dbadmin,/home/dbadmin
You can also use admintools to display a list of IP addresses:
$ admintools -t list_allnodes
Node | Host | State | Version | DB
-----------------+---------------+-------+----------------+-----------
v_vmart_node0001 | 203.0.113.111 | UP | vertica-10.1.1 | VMart
v_vmart_node0002 | 203.0.113.112 | UP | vertica-10.1.1 | VMart
v_vmart_node0003 | 203.0.113.113 | UP | vertica-10.1.1 | VMart
Tip
list_allnodes can help you identify issues that you might have to access Vertica. For example, if hosts are not communicating with each other, the Version column displays Unavailable.