[SOLVED] understanding pve-zsync

andy77

Well-Known Member
Jul 6, 2016
248
13
58
40
Hi@all,

I am actually trying to understand pve-zsync but don't get it...

I have a working node and a backup node trying to sync snapshots every 15min to the backup node.

Here the behaivour of pve-zsync or zfs that I don't understand:

on working node
Code:
Every 2.0s: zfs list -t snapshot -r rpool2/data/vm-122-disk-1                                                                                              node: Tue Apr 10 11:38:50 2018

NAME                                                                   USED  AVAIL  REFER  MOUNTPOINT
rpool2/data/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:25:10  2.63G      -  76.8G  -
rpool2/data/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:30:01  69.7M      -  76.8G  -

the second snapshot has only a few MB and is growing the whole time very very slowly
Code:
root@node:~# pve-zsync list
SOURCE                   NAME                     STATE     LAST SYNC           TYPE  CON
122                      vm1-QUATERHOURLY       ok        2018-04-10_11:30:01 qemu  ssh

As the command show, pve-zsync should not do nothing

on backup node
Code:
Every 2.0s: zfs list -t snapshot -r rpool/quaterhourly                                                                                                     backup: Tue Apr 10 11:41:33 2018

NAME                                                                              USED  AVAIL  REFER  MOUNTPOINT
rpool/quaterhourly/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:25:10      2.63G      -  76.8G  -
rpool/quaterhourly/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:30:01         0B      -  76.8G  -

I see a second snapshot with 0 Byte


So the question is, what is happaning here, why snapshot 2 on working node is growing the whole time (very very slowly) if pve-zsync is not working? And what is the second snapshot on backup node with 0 Byte?


Thanks a lot for any explanations

Regards
Andy
 
Hi Andy,
the actual snapshot represent the same content like the volume - this is the reason, why the size is zero. Wtih the next run, the content of the volume will changed and the size of (now older) snapshot too.

Udo
 
So that means that the volume "rpool/quaterhourly/vm-122-disk-1" is the last snapshot "rpool/quaterhourly/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:30:01", and that the volume is always the "most actual copy"?

And what does the last snapshot on the working node, that is growing slowly, means?
 
So that means that the volume "rpool/quaterhourly/vm-122-disk-1" is the last snapshot "rpool/quaterhourly/vm-122-disk-1@rep_vm1-QUATERHOURLY_2018-04-10_11:30:01", and that the volume is always the "most actual copy"?
right, this is the reason, why you can destroy without trouble (and fast) an snapshot - the original volume will not affected.
And what does the last snapshot on the working node, that is growing slowly, means?
The same - you (or better say pve-zsend) create an snapshot of the volume. At the first time the snapshot has an size of zero.
This snapshot will send to the backup-node (to the volume with an zero-byte snapshot because snapshot + volume are the same data).
On the working node any write to the volume produce an filling (of the old values) in the snapshot. So the snapshot expand in size.

Udo
 

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!