During the SAP HANA installation, installation programs use host names for communication. Therefore, you must configure the mapping between hostnames and IP addresses.
In cluster scenarios, you will switch to the first SAP HANA server. Then, you will perform operations on this HANA server when installing SAP HANA.
The format is "IP-Address Full-Qualified-Hostname Short-Hostname".
In an SAP HANA system, you must write the mapping between all SAP HANA node IP addresses and node names into the hosts file.
Take the IP addresses 10.0.4.2 to 10.0.4.3 of the system replication plane for two SAP HANA nodes in single-node scenarios where HA is required as an example.
The edited content is as follows:
... 10.0.4.2 hana001 hana001 10.0.4.3 hana002 hana002
The command is in the following format:
scp /etc/hosts Peer IP address:/etc/hosts
This operation is performed only in single-node scenarios where HA is required.
Verify the SSH switching between SAP HANA nodes.
Use SSH to switch from one SAP HANA node to all SAP HANA nodes (including the current node) to ensure that the switching is correct.
For example, if the name of the peer SAP HANA node is hana002, run the following command: