OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.19k stars 472 forks source link

Increment_flatten can be executed using `qemu-img commit` instead of `qemu-img convert` #6547

Open nachowork90 opened 3 months ago

nachowork90 commented 3 months ago

Description The goal is shorten the time and I/O required to merge the full and the next incremental on the chain when the keep_last value reached.

Use case When we execute the qemu-img commit on the top file that point to the base image (backing_file) or full image in this case. Only the changes of the incremental goes to override the clusters in the base image, even if there are more than 1 elements in the chain.

Interface Changes remotes/datastore/rsync/increment_flatten to modify the function merge_chain call remotes/tm/lib/backup.rb to add a new function the handle this scenario.

Additional Context Operations performed in the rsync host:

qemu-img commit -f qcow2 '/var/lib/one/datastores/100/7/768671/disk.0.3'                                                                                                                │·
mv '/var/lib/one/datastores/100/7/2757f7/disk.0.0' '/var/lib/one/datastores/100/7/768671/disk.0.3'

Progress Status

Franco-Sparrow commented 3 months ago

This has a storage and backup time saving approach. Awsome nacho :)