[Libguestfs] [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files

Nir Soffer nsoffer at redhat.com
Mon Sep 2 19:17:00 UTC 2019


On Mon, Sep 2, 2019 at 7:47 PM Richard W.M. Jones <rjones at redhat.com> wrote:

> I was trying to find some documentation for this
> field and the best I could find is:
>
> https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/constants.py
>
> What do the numbers mean?  The comments in the file indicate
> that strings are valid too (eg. DISKTYPE=OVFS).
>

This may make it more clear:
https://github.com/oVirt/vdsm/blob/48ab4a8e1931d527086192983599946b7bd1e87a/lib/vdsm/storage/constants.py#L116

You can see that "1" is considered as "DATA" disk. However this is wrong,
based
on incorrect documentation in vdsm, which may explain why the value "1"
sneaked
into v2v.

The concept of disk type was never used by engine and it always sent the
value "2" until
4.2, when we actually started to use disk types and converted the values to
strings.

When writing to export domain, you should use the value "2".

Also this patch as written will affect -o vdsm mode too (another
> deprecated-ish mode where we write directly to the Storage Domain).
> I don't know if that's right or not.
>

Writing to data domain is even more evil, since the format depends on the
storage domain
version, but "2" will work for any ovirt version.

Nir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190902/d20f3981/attachment.htm>


More information about the Libguestfs mailing list