[Libguestfs] [PATCH libnbd] PROPOSAL Add nbdcp (NBD copying) tool.

Daniel P. Berrangé berrange at redhat.com
Thu Jan 23 10:55:08 UTC 2020


On Wed, Jan 22, 2020 at 02:40:37PM +0000, Richard W.M. Jones wrote:
> This is a proposal for an NBD to/from file copying tool (not actually
> written).  Obviously this would duplicate functionality which is
> already available in qemu-img convert.
> 
> The reasons for writing this tool would be:
> 
>  - to produce a tool which is very focused on the specific needs of
>    virt-v2v and similar migration scenarios

It isn't going to need to use  qcow2 ever ?

>  - to have a small tool with minimal dependencies

If you only care about qemu-img with raw files, then QEMU's
dependancies are minimal - little more than glib I expect.

>  - fix some of the obvious problems with qemu-img convert like how it
>    handles devices which are already zeroed, and preallocation
> 
>  - enable optimizations which make sense for NBD but which might not
>    be applicable to qemu (eg. multi-conn, freely writing out of order
>    from multiple threads).

I'd expect multi-conn to be in-scope for QEMU. We have multi-conn
live migration data streams for memory copy, and for the same
reasons as this, I'd expect QEMU will need multi-conn live
migration data streams for disk copy which uses NBD.

I'm not sure what you mean by writing out of order from many
threads, but to support multi-conn, it would have to support
concurrent writers.

> Alternative is of course to not write a new tool and instead try to
> fix all this stuff in qemu-img itself.

That would be my first preference - or at least include the QEMU
maintainers on this message to determine whether addressing it in QEMU
is practical in a reasonable time frame.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libguestfs mailing list