<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000"><span style="color:rgb(34,34,34)">On Mon, Sep 2, 2019 at 7:47 PM Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I was trying to find some documentation for this<br>
field and the best I could find is:<br>
<br>
<a href="https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/constants.py" rel="noreferrer" target="_blank">https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/constants.py</a><br>
<br>
What do the numbers mean?  The comments in the file indicate<br>
that strings are valid too (eg. DISKTYPE=OVFS).<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">This may make it more clear:</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><a href="https://github.com/oVirt/vdsm/blob/48ab4a8e1931d527086192983599946b7bd1e87a/lib/vdsm/storage/constants.py#L116">https://github.com/oVirt/vdsm/blob/48ab4a8e1931d527086192983599946b7bd1e87a/lib/vdsm/storage/constants.py#L116</a></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">You can see that "1" is considered as "DATA" disk. However this is wrong, based</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">on incorrect documentation in vdsm, which may explain why the value "1" sneaked</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">into v2v.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">The concept of disk type was never used by engine and it always sent the value "2" until</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">4.2, when we actually started to use disk types and converted the values to strings.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">When writing to export domain, you should use the value "2".</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also this patch as written will affect -o vdsm mode too (another<br>
deprecated-ish mode where we write directly to the Storage Domain).<br>
I don't know if that's right or not.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"> Writing to data domain is even more evil, since the format depends on the storage domain</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">version, but "2" will work for any ovirt version.</div></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">Nir</div></div></div>