On 02/13/2015 02:01 AM, Fam Zheng wrote:
On Fri, 02/13 13:09, Wen Congyang wrote:
What is image fleecing?
It's the name of the feature which enables the built-in NBD server to exporting
a thin point-in-time snapshot created via drive-backup sync=none.
It's for host side data scanning tool to access a disk snapshot of running VM.
The workflow in theory is:
1. guest uses "disk0" as its virtio-blk device.
2. in qmp, use blockdev-add (drive-backup) to add an empty "target0" qcow2
image, that uses "disk0" as its backing file, and use nbd-server-add to export
this empty image with NBD. This way, all reads coming from NBD client will
produce data of "disk0".
3. in qmp, start blockdev-backup from "disk0" to "target0" with "sync=none".
After this point, all guest data written to "disk0" will COW the original data
to "target0", in other words, reading "target0" will effectively produce a
point-in-time snapshot of the time when blockdev-backup started.
4. after step 3, the disk data seen by the NBD client is the stable snapshot.
Because of the COW mechanism in blockdev-backup, "target0" is thin, and can be
dropped once the inspection process is done.
Are you implementing it now?
I worked on it. Most parts of the series is merged, the remaining part is
relatively small, namely to
1) enable adding "target0" in step 2 (currently in blockdev-add it's not
possible to reference an existing drive as backing file);
2) enable "blockdev-backup" from "disk0" to "target0", which is obviously not
possible because 1) is not done.
I do have the patches at my tree, just that they need to be refreshed. :)
https://github.com/famz/qemu/tree/image-fleecing
Fam
I had intended to pick up these patches after I got incremental backup
working, as Fam had started both of these projects and I inherited them
-- though I hadn't begun work in earnest on refining and testing this
particular feature yet.
--js