ZFS Setup for Proxmox HA¶
Requirement¶
- Separate empty drive on each node.
- Good to have minimum 3 nodes.
Steps: ZFS and HA¶
- Go to ZFS section under disks on each node
- Select the option to create ZFS.
- Select the disk and click create.
- IMPL: Check the "Add Storage" box on only the first node and make sure that this option is unckecked on all other nodes.
- Use same ZFS name for #3.
- Go to datacenter -> Storage -> Add: ZFS and in Nodes, select all the nodes where you created ZFS.
- Make sure
EnableandThin provisionoption is checked. (Thin Provision allows the VM disks to only take space that is used by the VM and not full VM disk size) - For HA, make sure VM/LXC are using this new ZFS, else move the disk to ZFS.
- For nodes to automatically start on a different node, following two things needs to be setup:
- Replication: In VM/LXC, enable replication of disk to the node where you want HA. HA run of VM/LXC would use the disk from latest replication.
- HA: Under datacenter -> HA -> Groups, create group selecting the nodes where you want this VM/LXC to fallback to and enable HA for this VM/LXC with this group selected.(High number is high priority)
Reduce VM disk size¶
Proxmox let's you increase the disk size from UI but not reduce. To reduce the disk size, you need to use following command: