Poor Man’s High Availability Setup for Proxmox VE with ZFS Replication
This report outlines a cost-effective approach to implementing high availability (HA) in a Proxmox Virtual Environment (PVE) using a combination of shared storage and ZFS replication. This “poor man’s HA” solution provides failover capabilities without the complexity and expense of enterprise-grade HA implementations.
Understanding High Availability in Proxmox
High Availability in Proxmox ensures that virtual machines (VMs) continue to run even when a node fails. Traditional HA setups typically require shared storage solutions like SAN, NAS, or Ceph. However, for smaller environments or homelab setups, a more economical approach using ZFS replication can be implemented[2].
The standard Proxmox HA implementation detects node failures and automatically migrates VMs to functioning nodes. However, this requires shared storage so that all nodes can access VM disks[4]. In our “poor man’s” setup, we’ll combine shared storage for normal operation with ZFS replication as a backup mechanism when shared storage fails.
Key Differences from Enterprise HA Solutions
This approach differs from enterprise solutions in several ways:
- Potential for minor data loss (depending on replication frequency)
- Longer recovery time
- Manual intervention may be required in some failure scenarios
- Lower overall cost and complexity
Prerequisites for Implementation
Before beginning the setup, ensure you have:
- Two Proxmox VE nodes with identical versions installed
- ZFS storage configured on both nodes with identical pool names
- Network connectivity between nodes
- A third device to serve as a quorum witness (QDevice)
- Shared storage accessible by both nodes (NFS, iSCSI, etc.)
- Time synchronization between all nodes[4]
The quorum witness is crucial when working with only two nodes, as Proxmox clustering requires majority consensus to function properly. With only two nodes, neither can achieve majority if communication is lost[5].
Setting Up the Proxmox Cluster
Step 1: Create the Cluster
Log in to your first Proxmox node and create a new cluster:
- Navigate to Datacenter > Cluster > Create Cluster
- Name your cluster and click “Create”[4]
- After creation, you’ll receive a join information that will be used to add the second node
Step 2: Join the Second Node to the Cluster
On the second node:
- Navigate to Datacenter > Cluster > Join Cluster
- Enter the information from the first node
- Provide the root password of the first node when prompted[4]
Step 3: Configure Quorum Device
With only two nodes, you need a third device to maintain quorum:
- Set up a QDevice on a separate system (can be a small VM or Raspberry Pi)[5]
- Configure the QDevice to work with your cluster to prevent split-brain issues
Configuring Storage for High Availability
Step 1: Set Up Identical ZFS Pools on Both Nodes
Create ZFS pools with identical names on both nodes:
zfs create tank/vm-storage
This is crucial as the VM will need to access storage with the same path on both nodes[1].
Step 2: Configure Shared Storage
Set up shared storage that both nodes can access:
- Configure a NAS/SAN with NFS or iSCSI
- Add this storage to both Proxmox nodes with identical configurations
- Create your VM on this shared storage for normal operations[2]
Step 3: Set Up ZFS Replication Between Nodes
Configure ZFS replication to ensure VM data is synchronized between nodes:
- Set up regular ZFS send/receive operations between the nodes
- For example, using pve-zsync[7]:
pve-zsync create --source <first-node-ip>:<vmid> --dest tank/vm-storage --verbose --maxsnap 2 --name zfsrep1 --limit 512
Alternatively, you can create a cron job for regular ZFS send/receive operations. Replication intervals can be as frequent as every minute, depending on your recovery point objective[14].
Implementing the Failover Mechanism
Step 1: Create HA Group and Add Resources
- Navigate to Datacenter > HA > Groups
- Create a new HA group including both nodes
- Under Resources, add the VM you want to protect[15]
- Configure the VM to start on shared storage under normal conditions
Step 2: Configure VM for ZFS Failover
The trickier part is setting up the system to use local ZFS storage when shared storage fails:
- Ensure VM configuration files are replicated between nodes
- Create a script that detects shared storage failure
- Configure the script to modify VM config to use local ZFS storage
- Add this script to your monitoring system
A sample script approach could check for shared storage availability and modify the VM configuration to point to the local ZFS storage when needed.
Testing and Monitoring the HA Setup
To ensure your poor man’s HA setup works as expected:
- Test planned node failures by shutting down one node and verifying VM migration
- Simulate shared storage failure to verify failover to local ZFS storage
- Check data consistency after failovers to ensure minimal data loss
- Monitor replication status regularly to ensure ZFS snapshots are current[13]
Remember that with this approach, data loss is still possible depending on the frequency of ZFS replication. The most recent common snapshot between nodes represents your recovery point in case of failure[11].
Limitations and Considerations
This poor man’s HA approach has several limitations to consider:
- Data loss potential: Any changes since the last ZFS replication will be lost
- Recovery time: Failing over to local ZFS storage might take longer than enterprise HA solutions
- Manual intervention: Some scenarios might require manual intervention
- Two-node limitations: A third quorum device is required to prevent split-brain issues[5][16]
- Storage consistency: If a node fails and then returns, storage synchronization issues can occur[11]
Conclusion
The “poor man’s high availability” approach for Proxmox VE using shared storage with ZFS replication as a fallback provides a cost-effective alternative to enterprise HA solutions. While it doesn’t offer the same level of protection as more complex setups, it significantly improves resilience compared to a non-HA environment.
For many small-scale deployments, homelab environments, or situations where budget constraints are a factor, this approach offers a practical compromise between cost, complexity, and reliability[14]. By ensuring that VMs can continue to run even when a node fails, this setup helps maintain service availability without requiring expensive shared storage solutions or complex Ceph implementations.
Remember that the effectiveness of this solution depends heavily on proper configuration, regular testing, and understanding the recovery scenarios that might occur in your specific environment.
Sources
[1] Poor man’s redundancy options - Proxmox Support Forum Poor man's redundancy options | Proxmox Support Forum
[2] Proxmox High Availability - is shared storage necessary? - Reddit https://www.reddit.com/r/Proxmox/comments/187p2ax/proxmox_high_availability_is_shared_storage/
[3] [SOLVED] - Is it possible to make failover with 2 nodes and zfs [SOLVED] - Is it possible to make failover with 2 nodes and zfs | Proxmox Support Forum
[4] How to Set Up Clustering and High Availability in Proxmox - Tecmint How to Set Up Clustering and High Availability in Proxmox
[5] Proxmox Clustering with 2 Nodes - Apalrd Proxmox Clustering with 2 Nodes :: apalrd's adventures
[6] High Availability with local ZFS storage - Proxmox Support Forum High Availability with local ZFS storage | Proxmox Support Forum
[7] PVE-zsync - Proxmox VE PVE-zsync - Proxmox VE
[8] High Availability - Proxmox VE High Availability - Proxmox VE
[9] HA / Failover configuration - Proxmox Support Forum HA / Failover configuration | Proxmox Support Forum
[10] How to set up poor man’s HA - Proxmox Support Forum How to set up poor man's HA | Proxmox Support Forum
[11] ZFS Replication for HA : r/Proxmox - Reddit https://www.reddit.com/r/Proxmox/comments/10w5w4i/zfs_replication_for_ha/
[12] Proxmox High Availibilty with “no” failover time - Reddit https://www.reddit.com/r/Proxmox/comments/1g247ib/proxmox_high_availibilty_with_no_failover_time/
[13] High availability without network storage? : r/Proxmox - Reddit https://www.reddit.com/r/Proxmox/comments/18w5miq/high_availability_without_network_storage/
[14] Poor man’s HA VPS cluster - LowEndTalk https://lowendtalk.com/discussion/170898/poor-mans-ha-vps-cluster
[15] Building a Highly Available (HA) two-node Home Lab on Proxmox Building a Highly Available (HA) two-node Home Lab on Proxmox – A nice guy's view on life
[16] Building a low-cost, high-availability cluster using Windows Failover … https://serverfault.com/questions/1141307/building-a-low-cost-high-availability-cluster-using-windows-failover-cluster-or
[17] Poor man’s HA VPS cluster - Web Hosting Talk Poor man's HA VPS cluster | Web Hosting Talk
[18] HA and ZFS : r/Proxmox - Reddit https://www.reddit.com/r/Proxmox/comments/18bt54u/ha_and_zfs/
[19] $100 3-Node Proxmox HIGH AVAILABILITY CLUSTER SETUP https://www.youtube.com/watch?v=jRroVNHBDeI
[20] Proxmox HA chat - NethServer Community Proxmox HA chat - Chat - NethServer Community
[21] Proxmox, VM Redundancy Using ZFS Replication - Tech Tutorials Proxmox, VM Redundancy Using ZFS Replication | Tech Tutorials
[22] High Availability + Replication = Disaster - Proxmox Support Forum High Availability + Replication = Disaster | Proxmox Support Forum
[23] pspglb/pve-zsync-manager - GitHub GitHub - pspglb/pve-zsync-manager: A manager/enhancement for pve-zsync of Proxmox VE
[24] High Availability / Cluster using local disks : r/Proxmox - Reddit https://www.reddit.com/r/Proxmox/comments/185d6zl/high_availability_cluster_using_local_disks/
[25] Setup a Proxmox Two-Node High Availability Cluster with a … Setup a Proxmox Two-Node High Availability Cluster with a RaspberryPi as a third Quorum vote device (qdevice) - Florian Müller
[26] Mastering VM Replication in Proxmox VE with ZFS | Vinchin Backup Mastering VM Replication in Proxmox VE with ZFS | Vinchin Backup
[27] Proxmox Nested Cluster - HA - ZFS - Dell PowerEdge Proxmox Nested Cluster - HA - ZFS - Dell PowerEdge | Proxmox Support Forum
[28] Proxmox, ZFS and HA Proxmox, ZFS and HA - Proxmox - Practical ZFS
[29] Proxmox, VM Redundancy Using ZFS Replication - YouTube https://www.youtube.com/watch?v=RYENnzHWawI
[30] [SOLVED] - How does Replication work in a HA environment? [SOLVED] - How does Replication work in a HA environment? | Proxmox Support Forum
[31] Setting Up Cluster with 3 Nodes for HA in Proxmox VE Setting Up Cluster with 3 Nodes for HA in Proxmox VE | Vinchin Backup
[32] Proper ZFS Replication & HA - Proxmox Support Forum Proper ZFS Replication & HA | Proxmox Support Forum
[33] PROXMOX High Availability Primary with secondary fallback? - Reddit https://www.reddit.com/r/homelab/comments/13az3k7/proxmox_high_availability_primary_with_secondary/
[34] HA Groups Priorities - Proxmox Support Forum HA Groups Priorities | Proxmox Support Forum
[35] HA Migration issues when VM has local storage HA Migration issues when VM has local storage | Proxmox Support Forum
[36] Improved High Availability (HA) for VMs on Proxmox VE (PVE) Improved High Availability (HA) for VMs on Proxmox VE (PVE) | kiwicloud.ninja
[37] Setting Up Proxmox High Availability Cluster & Ceph - YouTube https://www.youtube.com/watch?v=Eli3uYzgC8A
[38] getting a Proxmox hook script to spin off a background … - Reddit https://www.reddit.com/r/Proxmox/comments/fbb1gu/getting_a_proxmox_hook_script_to_spin_off_a/
[39] Newbie: Do I really need Replication for HA to work? : r/Proxmox https://www.reddit.com/r/Proxmox/comments/13zfz52/newbie_do_i_really_need_replication_for_ha_to_work/
[40] Cluster failover rules / VM priorities? - Proxmox Support Forum Cluster failover rules / VM priorities? | Proxmox Support Forum
[41] Centralized Storage with Local SSD Failover | Proxmox Support Forum Exploring High-Availability in Proxmox: Centralized Storage with Local SSD Failover | Proxmox Support Forum
[42] Explaining snippets feature - Proxmox Support Forum Explaining snippets feature | Proxmox Support Forum
[43] hookscript becomes unavailable during host shutdown hookscript becomes unavailable during host shutdown | Proxmox Support Forum
[44] vzdump Backup Hook Script is ignored - Proxmox Support Forum vzdump Backup Hook Script is ignored | Proxmox Support Forum
[45] Backup and Restore - Proxmox VE Backup and Restore - Proxmox VE
[46] post-start script for LXC - Proxmox Support Forum post-start script for LXC | Proxmox Support Forum
[47] Proxmox storage full and unable to clear [closed] - Server Fault https://serverfault.com/questions/1160990/proxmox-storage-full-and-unable-to-clear
[48] Proxmox Drive Failure? Help! - Reddit https://www.reddit.com/r/Proxmox/comments/z2ea9t/proxmox_drive_failure_help/
[49] vzdzump script / enable cifs storage - Proxmox Support Forum vzdzump script / enable cifs storage | Proxmox Support Forum
[50] Strategy for fastest HA failover of VM in cluster? : r/Proxmox - Reddit https://www.reddit.com/r/Proxmox/comments/oihkpc/strategy_for_fastest_ha_failover_of_vm_in_cluster/