In this tutorial, we’re going to look at how to create a 2-node cluster in Proxmox. There is so much functionality that you use when you configure a cluster in Proxmox, but in order for them to work properly, there really need to be three full nodes.
However, many users will be able to run all of their services on two devices, and adding a third device can increase the overall costs for the device and the electricity costs running it 24/7. In situations like this, creating a 2-node cluster makes sense, but you really need a third vote in order to ensure that everything works properly.
The third vote is extremely important in this, as it ultimately will determine exactly which node is down or disconnected (as two nodes will basically point fingers at each other).
Some links below are Amazon affiliate links which means that I earn a percentage of each sale at no cost to you. Thank you for your support.
What Type of Device Do You Need for Quorum?
The key that we’ll be configuring in this tutorial is Quorum. Quorum will act as the third vote without actually running the Proxmox OS.
The steps below can run on any Debian-based device, but we’ll be using a Raspberry Pi specifically because it’s one of the cheapest options. Remember, you don’t need a Raspberry Pi, but you do need it to be a separate device from the two Proxmox nodes.
This ensures that if one of the two devices goes down, this device will stay up to vote and maintain Quorum.
How to Create a 2-Node Cluster in Proxmox
Before you look at the steps below, you need to actually configure the Proxmox Cluster. This is the most important step, but rather than using three nodes, you’ll stop at two. The steps below will configure the third device to vote.
Step 1: Configuring Corosync
1. After configuring the Raspberry Pi OS (remember, this can be any Debian-based device you’re using), run the command below to access the SSH configuration and permit login for root. This will allow you to SSH into the Raspberry Pi at a later step.
sudo nano /etc/ssh/sshd_config
In the configuration file, uncomment (by removing the # symbol) the line below, then restart the SSH service.
PermitRootLogin yes
sudo systemctl restart sshd
2. Now that we’ve permitted root, you can install the two necessary components by running the command below:
sudo apt install corosync-qnetd -y && sudo apt install corosync-qdevice -y
3. After the packages are installed, you can move on to the next step in configuring both Nodes to use the Raspberry Pi.
Step 2: Configuring Both Nodes in Proxmox
Now that we’ve configured the Raspberry Pi (or whatever device you’re using), we need to add this device to both Nodes.
1. Open Proxmox, select the first Node, and then open the Shell for that node. Run the command below substituting the IP address of the device we configured above.
pvecm qdevice setup [IP ADDRESS]
After the device connects, you’ll have to sign in to it using the root password of the Raspberry Pi. As soon as you do, it’ll be configured on that device.
2. Make sure that you run the command above on both nodes! After you do, you can run the command below to list out the nodes and you should see one listed as Qdevice. This will be the device that will act as the third vote.
pvecm nodes
At this point, the nodes are configured and the Raspberry Pi will act as the final vote, so if one of the Proxmox nodes goes down, everything will continue to function as expected.
Conclusion & Final Thoughts: Should You Use a 2-Node Cluster?
Setting up a 2-node Cluster in Proxmox simplifies everything as you may not physically need a third device. However, utilizing a cheap Raspberry Pi and configuring Quorum will ensure that you have three votes at all times and your Proxmox cluster will function the same way with only 2-nodes, that a fully functional 3-node system would. This also will allow you to migrate VMs, configure high availability, etc.
Thanks for checking out the tutorial on how to set up a 2-node cluster in Proxmox. If you have any questions, please leave them in the comments!