<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 9:42 AM, Avishay Traeger <span dir="ltr"><<a href="mailto:avishay@stratoscale.com" target="_blank">avishay@stratoscale.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>One more reason why block storage management doesn't really work on file systems.  I'm OK with storing the format, but that just means you fail migration/backup operations with different formats, right?</div>

</div></blockquote><div><br></div><div class="gmail_default" style="font-family:'courier new',monospace">​+1... sooooo nice that somebody else said it for me this time!!</div><div class="gmail_default" style="font-family:'courier new',monospace">

<br></div><div class="gmail_default" style="font-family:'courier new',monospace">We need to make sure this is completely abstracted from end-user and the manager can make the right decisions (ie implement a way to work from one to the other)​. </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Mon, Jun 23, 2014 at 6:07 PM, Trump.Zhang <span dir="ltr"><<a href="mailto:zhangleiqiang@gmail.com" target="_blank">zhangleiqiang@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi, all:</div><div><br></div><div>    Currently, there are several filesystem-based drivers in Cinder, such as nfs, glusterfs, etc. Multiple format of volume other than "raw" can be potentially supported in these drivers, such as qcow2, raw, sparse, etc.</div>



<div>    </div><div>    However, Cinder does not store the actual format of volume and suppose all volumes are "raw" format. It will has or already has several problems as follows:</div><div>    </div><div>    1. For volume migration, the generic migration implementation in Cinder uses the "dd" command to copy "src" volume to "dest" volume. If the src volume is "qcow2" format, instance will not get the right data from volume after the dest volume attached to instance, because the info returned from Cinder states that the volume's format is "raw" other than "qcow2"</div>



<div>    2. For volume backup, the backup driver also supposes that src volumes are "raw" format, other format will not be supported</div><div>    </div><div>    Indeed, glusterfs driver has used "qemu-img info" command to judge the format of volume. However, as the comment from Duncan in [1] says, this auto detection method has many possible error / exploit vectors. Because if the beginning content of a "raw" volume happens to a "qcow2" disk, auto detection method will judge this volume to be a "qcow2" volume wrongly.</div>



<div>    </div><div>    I proposed that the "format" info should be added to "admin_metadata" of volumes, and enforce it on all operations, such as create, copy, migrate and retype. The "format" will be only set / updated for filesystem-based drivers,  other drivers will not contains this metadata and have a default "raw" format.</div>



<div>    </div><div>    Any advice?</div><div><br></div><div>[1] <a href="https://review.openstack.org/#/c/100529/" target="_blank">https://review.openstack.org/#/c/100529/</a></div><span><font color="#888888"><div>
<br></div>-- <br><div dir="ltr">-------------------<div>
Best Regards</div><div><br></div><div>Trump.Zhang</div></div>
</font></span></div>
<br></div></div><div class="">_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>