There are times when 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
While you can change IP addresses of the hosts in your cluster, you cannot change from one address family (IPv4 vs. IPv6) to another. For example, suppose the hosts in your database cluster are identified by IPv4 network addresses. Then you can only change the host's addresses to another IPv4 address. You cannot change them to an IPv6 addresses.To change the IP addresses of hosts in your database cluster, use the re_ip
function to re-IP and map old addresses to the new ones:
$ admintools -t re_ip -f mapfile
The mapfile references the file that you create, which contains the old and new IP addresses.
Use this function to re-IP in one of the following situations:
-
If your Vertica database cluster has the same data and control messaging address, do one of the following:
-
Re-IP all the database cluster node IP addresses.
-
Re-IP only one or some of the database cluster node IP addresses.
$ admintools -t re_ip -f mapfile
-
-
Re-IP the Vertica database cluster from broadcast mode to point-to-point (unicast) mode:
$ admintools -t re_ip -d dbname -T
-
Re-IP the Vertica database cluster from point-to-point (unicast) mode to broadcast mode :
$ admintools -t re_ip -d dbname -U
Note
For information on changing communications protocols, see the -U and -T options under Installing Vertica with the installation script. -
Re-IP 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
-
Re-IP only one database address without changing the admintools configuration. See Mapping IP Addresses on the Database only.
Note
The database only re-ip is useful for error recovery. The node names and IP addresses must be the same as the node information in admintools.conf. You can also runSELECT * from vs_nodes order by name
to display the node information.
For more information on the options used in the above commands, see Re-IP command-line options.
Re-IP and the export IP address
By default, the node IP address and the export IP address are configured with the same IP address. The export address is the IP address of the node on the network with access to other DBMS systems. Use the export address for importing and exporting data from DBMS systems. You can manually change the export address using the instructions found here.
If you change the export address and run the re-ip command, the export address remains the same.
Example
Run the following command:
=> 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)
In the above example the export_address is the default. In this case, when you run the re-ip command the export_address changes to the new node_address.
If you manually change the export address as described here, you may have something like the following:
=> SELECT node_name, node_address, export_address FROM nodes;
node_name | node_address | export_address
------------------------------------------------------
v_VMartDB_node0001 | 192.168.100.101 | 10.10.10.1
v_VMartDB_node0002 | 192.168.100.102 | 10.10.10.2
v_VMartDB_node0003 | 192.168.100.103 | 10.10.10.3
v_VMartDB_node0004 | 192.168.100.104 | 10.10.10.4
(4 rows)
In this case, when you run the re-ip command the export_address does not change.
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 display a list of IP addresses with the following:
$ 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