About the dirty-bitmaps

efernandez

Member
Jun 15, 2020
6
0
6
47
Hi all.

A question about the dirty-bitmaps of the disks. Can the dirty-bitmaps be lost if two consecutive backups are made but to different datastores? I'll explain:

We have a virtual machine with a scheduled backup every hour on a storage called PBS-snapshot and another task at 9:00 p.m. on a different storage called PBS. The virtual machine did not power off / power on.

Tasks logs:

DATASTORE: PBS-snapshot
INFO: Backup started at 2021-07-15 20:30:00
INFO: status = running
INFO: VM Name: XXX
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive ‘XXX’
INFO: scsi0: dirty-bitmap status: OK (296.0 MiB of 32.0 GiB dirty)
INFO: scsi1: dirty-bitmap status: OK (432.0 MiB of 1.0 TiB dirty)

DATASTORE: PBS
INFO: Backup started at 2021-07-15 21:00:00
INFO: status = running
INFO: VM Name: XXX
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive ‘XXX’
INFO: scsi0: dirty-bitmap status: existing bitmap was invalid and has been cleared
INFO: scsi1: dirty-bitmap status: existing bitmap was invalid and has been cleared

DATASTORE: PBS-snapshot
NFO: Backup started at 2021-07-16 00:16:00
INFO: status = running
INFO: VM Name: XXX
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive ‘XXX’
INFO: scsi0: dirty-bitmap status: existing bitmap was invalid and has been cleared
INFO: scsi1: dirty-bitmap status: existing bitmap was invalid and has been cleared

DATASTORE: PBS-snapshot
INFO: Backup started at 2021-07-16 08:10:53
INFO: status = running
INFO: VM Name: XXX
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive ‘XXX’
INFO: scsi0: dirty-bitmap status: OK (380.0 MiB of 32.0 GiB dirty)
INFO: scsi1: dirty-bitmap status: OK (292.0 MiB of 1.0 TiB dirty)

It seems to me that by changing the datastores we lose the dirty bitmaps, right?

Thanks in advance.
 
yes, the bitmap is only valid for a single backup snapshot in a single datastore, and we only keep one bitmap. so switching the datastore, or removing the corresponding backup snapshot will always invalidate the bitmap.
 
Hi, I'd like to ask what about dirty-bitmap of a stopped machine on PBS 1.1? I guess it should not change, but it looks like it's being recreated each time we do a backup, effectively just wasting the time:

Code:
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: *****
INFO: include disk 'scsi0' 'local-lvm:vm-2252-disk-0' 100G
INFO: creating Proxmox Backup Server archive 'vm/2252/2021-07-26T00:00:14Z'
INFO: starting kvm to execute backup task
INFO: enabling encryption
INFO: started backup task '2f98bae9-54e5-4a81-b2b6-ea002ba83f43'
INFO: scsi0: dirty-bitmap status: created new
INFO:   0% (412.0 MiB of 100.0 GiB) in  3s, read: 137.3 MiB/s, write: 0 B/s
[...]
INFO: 100% (100.0 GiB of 100.0 GiB) in 14m 30s, read: 245.0 MiB/s, write: 0 B/s
INFO: backup is sparse: 22.29 GiB (22%) total zero data
INFO: backup was done incrementally, reused 100.00 GiB (100%)
INFO: transferred 100.00 GiB in 870 seconds (117.7 MiB/s)
INFO: stopping kvm after backup task
INFO: Finished Backup of VM 2252 (00:14:34)
INFO: Backup finished at 2021-07-26 02:14:48
 
bitmaps are only kept while a VM is running. once you stop a VM, we cannot be sure that the disk remains unmodified until the next start - if anything modified the disk in the meantime, the backup based on the old bitmap would be corrupt/invalid.
 
I see, I just thought PVE can be sure nothing has changed on disk while the machine is off. Thanks for the explanation, fabian!
 

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!