Setup Proxmox HA for VMs with databases

Dec 12, 2024
7
0
1
Hello,
I am going to setup a PROMOX HA environment with 3 servers.
I am not sure which kind of storage to use to better support 3 requirements.
I have a lot of VMs with db (postgresql and mysql ) . I will have a lot of VM machines running on one using DB .
I need to satisfy these 3 requirements:
1) minimal downtime
If the node crashes all the VMs on that node will be rebooted on another node with downtime close to zero

2) minimal of data loss
If node crashes, the VMs will reboot on another node but what about data?
if using zfs and have a replicate every minute we will loose at most 1 minute of data? Am I right ? Using another kind of storage what will we loose ?

3) data consistency
If node crashes during db utilizzation, I mean there is a long transaction running and not yet finished , the VMs will reboot on another node and
the db consistency ? The transaction that was running when the crash happened what could cause ? Will it be rolled back ? Will it cause data loss ? Will it cause data inconsistency ? What to check if db is ok ?

So which kind of storage should I setup for these requirements ?

Thanks a lot
/Franco
 
ad 1] proxmox doesn't have "close to zero" VM failover
read proxmox documenattion how HA works

ad 2]
option a] shared network storage
option b] postgresql replication
both methods are documented on the internet

ad 3] postgresql documenation about WAL files

There is more than one answer which storage type can be used. Depends.
 
  • Like
Reactions: Johannes S
Hi ... agree to czechsys ... the terms which came into my mind were also "Crash Consistency" and "Application Aware Backup" you might searching for. I would also advise for achieving your goals with RDBMS-built-in replication capabilities. The PVE HA part could (like "Vmotion") make sure your VMs soon be up again, but DB consistency on shared storage is something very special with a lot of caveats.
 
  • Like
Reactions: Johannes S