How to delete a PVE Node in 2-Node Proxmox Cluster

This guide will walk you through the steps to safely delete a node from your Proxmox cluster.

How to delete a PVE Node in 2-Node Proxmox Cluster
Photo by Ujesh Krishnan / Unsplash

Managing a Proxmox Virtual Environment (PVE) cluster can sometimes require removing a node, especially in a small 2-node setup. This guide will walk you through the steps to safely delete a node from your Proxmox cluster.

Prerequisites

Before you begin, ensure you have:

  • Administrative access to the Proxmox cluster.
  • Important: Moved all virtual machines (VMs) and containers (LXCs) from the node you want to remove, using Migrate feature in the proxmox cluster. Delete all VMs/LXCs that you don't need to use anymore. If you don't move or delete all VMs/LXCs in the node then after delete node, these VMs/LXCs will remain appear in the web GUI after deleting node (see Step 4 to solve this).
  • Backed up any important data.

Steps to Remove a Node

  1. Power Off the Node: First, power off the node you want to remove by using the web GUI or SSH to the server and run poweroff command. This ensures that it wonโ€™t interfere with the cluster during the removal process. As noted earlier, it's essential to turn off the node before removing it and ensure it doesn't restart with its current settings within the cluster network. If you power it on without adjustments, it could disrupt the cluster and make it challenging to restore functionality.
ssh root@<node-to-remove>
poweroff
  1. Adjust Expected Votes: Since you have a 2-node cluster, you need to adjust the expected votes to maintain quorum. Run the following command on the remaining node:
pvecm expected 1

This command sets the expected votes to 1, allowing the cluster to function with a single node temporarily.

  1. Delete the Node: Use the pvecm delnode <node-name> command to remove the node from the cluster. Replace <node-name> with the name of the node you want to delete, for example: pvecm delnode pve2
pvecm delnode pve2

This command updates the cluster configuration and removes the node.

  1. Clean Up Configuration Files: If the node still appears in the Proxmox GUI, you might need to manually remove its configuration files. On the remaining node, delete the directory corresponding to the removed node:
rm -rf /etc/pve/nodes/<node-name>

The output should no longer list the removed node.

  1. Verify the Removal: Check the cluster status to ensure the node has been successfully removed:
pvecm status

The output should no longer list the removed node.

Conclusion

Removing a node from a 2-node Proxmox cluster requires careful steps to maintain cluster integrity. By following this guide, you can safely delete a node and ensure your cluster continues to operate smoothly. Always remember to back up your data and verify each step to avoid any disruptions.

If, for whatever reason, you want the removed server to join the same cluster again, you have to:

  • Do a fresh install of Proxmox VE on it,
  • Then join it.

I hope this helps! If you have any further questions or need additional assistance, feel free to share your experiences or ask questions in the comments below! ๐Ÿ˜Š