Skip to content

ZFS Setup for Proxmox HA

Requirement

  1. Separate empty drive on each node.
  2. Good to have minimum 3 nodes.

Steps: ZFS and HA

  1. Go to ZFS section under disks on each node
  2. Select the option to create ZFS.
  3. 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.
  4. Use same ZFS name for #3.
  5. Go to datacenter -> Storage -> Add: ZFS and in Nodes, select all the nodes where you created ZFS.
  6. Make sure Enable and Thin provision option is checked. (Thin Provision allows the VM disks to only take space that is used by the VM and not full VM disk size)
  7. For HA, make sure VM/LXC are using this new ZFS, else move the disk to ZFS.
  8. 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:

# list the disks
zfs list

# Get details of the disk
zfs get volsize zfs-store/vm-1001-disk-0

# Reduce the disk size, set the new size
zfs set volsize=100G zfs-store/vm-1001-disk-0

# update the vm to use the new disk size
qm disk rescan --vmid 1001
The content provided is generated with the help of artificial intelligence (AI) and may contain inaccuracies or outdated information due to the limitations of AI. While I strive to review and validate the content, some errors or inaccuracies may still be present in the final output. Please use this content as a general guide only and verify any critical information through reputable sources before relying on it. I appreciate your understanding and feedback in helping us improve the accuracy and quality of our AI-generated content."