For these steps, assume that eth0 is the primary interface and 127.0.0.10 is the IP we are trying to claim. Follow these steps to move or create a virtual IP:
- First, connect to the PostgreSQL node that had the IP address earlier. This is often the primary server.
- Release the IP address with the following command:
sudo ifconfig eth0:pgvip down
- Ping the desired IP address with this command:
ping -c 3 127.0.0.10
- If the preceding command reaches any PostgreSQL server, restart from the beginning with this system instead.
- Next, connect to the new server that should own the IP address.
- Claim the IP address with the following command:
sudo ifconfig eth0:pgvip 127.0.0.10
- Tell the network about the location of the new ...