A question about pve-zsync

giovvv

Active Member
Aug 4, 2018
45
0
26
56
Ok, maybe this is a stupid question, but I was wondering...

pve-zsync syncs a snapshot of the zvol containing the VM virtual disk. But since this is done while the VM is running (unlike what vzdump does), isn't it possible that the guest filesystem is "frozen" while it is in some inconsistent state? I am thinking, for example, of what can happen to a database if the VM is restored from such a backup.
 
Hi,

No. When a snapahot is created, zfs will also flush all data from ARC to the disks before start the snapshot.


Good luck / Bafta
 
No. But for zfs you do not need guest-freeze.

that's not true. ZFS snapshots are internally consistent, since ZFS always is, even on powerloss. but that doesn't mean that a freeze via the agent does not trigger additional actions that help with consistency within the VM (e.g., syncing the disks from a guest PoV, hooking into OS-provided consistency mechanisms, you could even call arbitrary commands to settle in-flight DB operations or whatever else strikes your fancy ;))
 
I start using snapshots in zfs 8 years ago. And usualy I need to recover files from this snapshots daily(including here DB files). I NEVER,
ever see any problem after restore this files!
 
Hi,

No. When a snapahot is created, zfs will also flush all data from ARC to the disks before start the snapshot.


Good luck / Bafta

that is also only partially true ("flushing the ARC" does not make much sense). any transactions in-flight when issuing a snapshot will be persisted before the snapshot is actually done, since a snapshot also happens in a (later) transaction ;).
 
I start using snapshots in zfs 8 years ago. And usualy I need to recover files from this snapshots daily(including here DB files). I NEVER,
ever see any problem after restore this files!

if all your applications are well-designed, you shouldn't. not all applications are though ;)
 
I start using snapshots in zfs 8 years ago. And usualy I need to recover files from this snapshots daily(including here DB files). I NEVER,
ever see any problem after restore this files!
Well, I guess most DBs should be power-off save, as long as the underlying FS does not do any mess.
 
that's not true. ZFS snapshots are internally consistent, since ZFS always is, even on powerloss. but that doesn't mean that a freeze via the agent does not trigger additional actions that help with consistency within the VM (e.g., syncing the disks from a guest PoV, hooking into OS-provided consistency mechanisms, you could even call arbitrary commands to settle in-flight DB operations or whatever else strikes your fancy ;))
Still the question: does pve-zsync freeze the guest FS before snapshot?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!