This article describes how to create a cluster with 4 servers.
Table of Contents
Explanation
In the following, the cluster is created from the following 4 servers:
f002 (AMD Opteron 3365 on this we create the cluster)
ca130 (Intel XEON E3-1270v3 Node)
srv1583 (HPE DL360 Gen10 Node)
srv10008 (HPE DL325 Gen10 Node)
1. Preparation
Unfortunately the hostnames of the servers cannot be changed afterwards, so you should think about what you want to call them.
Below I renamed "f002" to "f002-Cluster":
# hostnamectl set-hostname f002-Cluster
The hostname in /etc/hosts must also be changed:
# nano /etc/hosts
Before:
After:
2. Create Cluster
Now we can create the cluster with "pvecm create <Clustername>", in our example this is called "Testcluster":
2.1 Important
It is not possible for us to create a cluster with the standard setting with multicast without a own VLAN, for this we have to use unicast.
*** Update ***
As of Debian 10 + Proxmox 6 this setting is already automatically set to Unicast, so only Debian 8 and 9 have to be switched to Unicast.
***Update***
2.2 Switch to unicast
To change this, add "transport: udpu" to "/etc/pve/corosync.conf" as shown below:
# nano /etc/pve/corosync.conf
After restarting Corosync and executing the command "pvecm e 1", the nodes can now be added.
# service corosync restart
# pvecm e 1
2.3 Can I add a node with existing virtual machines?
No, please make sure that they have already been copied, as in the worst case data loss from the node can occur:
2.4 Add an empty node to the cluster
Log on to a node via SSH and add it to the cluster with "pvecm add <FQDN or IP>".
# pvecm add f002.fuchsia.fastwebserver.de
The output should look like this:
If everything worked, it should look like this inside the Proxmox interface: