<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">how can I set the extent size hint to a file with command line? <div class="">I have google for a lot, but I can't find a answer</div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 20px;" class="">----------------------------------------<br class=""> </div><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 20px;" class="">Github: <a href="https://github.com/baotiao" class="">https://github.com/baotiao</a><br class="">Blog: <a href="http://baotiao.github.io" class="">http://baotiao.github.io</a><br class="">Stackoverflow: <a href="http://stackoverflow.com/users/634415/baotiao" class="">http://stackoverflow.com/users/634415/baotiao</a> </div><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 20px;" class="">Linkedin: <a href="http://www.linkedin.com/profile/view?id=145231990" class="">http://www.linkedin.com/profile/view?id=145231990</a></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On May 30, 2016, at 13:04, Dave Chinner <<a href="mailto:david@fromorbit.com" class="">david@fromorbit.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Mon, May 30, 2016 at 12:45:07PM +0800, baotiao wrote:<br class=""><blockquote type="cite" class="">This machine is running for qemu, the file is qemu qcow file type<br class=""><br class="">[root@w-openstack20 /data/nova/instances/7898b630-c4ef-49ab-9ce9-3735e090c282]# file disk<br class="">disk: QEMU QCOW Image (v3), has backing file (path /data/nova/instances/_base/3f27393376152ac352b2d85703011e38517e), 429496729600 bytes<br class=""></blockquote><br class="">Oh, you're using delta/snapshot based qcow images. That, by it's<br class="">very nature, generates fragmented image files as they are a delta<br class="">over the backing file.<br class=""><br class="">....<br class=""><blockquote type="cite" class="">actual 48421430, ideal 20716, fragmentation factor 99.96%<br class=""><br class="">How can I solve this problem, what do you suggest me to do?<br class=""></blockquote><br class="">Use a extent size hint (say 1-8MB) for your qcow2 image files so that<br class="">they don't fragment badly as they are written to. <br class=""><br class="">Cheers,<br class=""><br class="">Dave.<br class="">-- <br class="">Dave Chinner<br class=""><a href="mailto:david@fromorbit.com" class="">david@fromorbit.com</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>