<div dir="ltr"><div>I have fint the way to change the extent size hint<br>mkfs.xfs -r extsize=40960 /dev/sda1<br><br></div>but I should rebuild the disk, do you have a way more smooth?<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 30, 2016 at 4:48 PM, baotiao <span dir="ltr"><<a href="mailto:baotiao@gmail.com" target="_blank">baotiao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">how can I set the extent size hint to a file with command line? <div>I have google for a lot, but I can't find a answer</div><div><span class=""><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="text-align:start;text-indent:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-align:start;text-indent:0px;word-wrap:break-word;font-size:20px">----------------------------------------<br> </div><div style="text-align:start;text-indent:0px;word-wrap:break-word;font-size:20px">Github: <a href="https://github.com/baotiao" target="_blank">https://github.com/baotiao</a><br>Blog: <a href="http://baotiao.github.io" target="_blank">http://baotiao.github.io</a><br>Stackoverflow: <a href="http://stackoverflow.com/users/634415/baotiao" target="_blank">http://stackoverflow.com/users/634415/baotiao</a> </div><div style="text-align:start;text-indent:0px;word-wrap:break-word;font-size:20px">Linkedin: <a href="http://www.linkedin.com/profile/view?id=145231990" target="_blank">http://www.linkedin.com/profile/view?id=145231990</a></div></div></div></div></div>
</div>
<br></span><div><div class="h5"><div><blockquote type="cite"><div>On May 30, 2016, at 13:04, Dave Chinner <<a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.com</a>> wrote:</div><br><div><div>On Mon, May 30, 2016 at 12:45:07PM +0800, baotiao wrote:<br><blockquote type="cite">This machine is running for qemu,  the file is qemu qcow file type<br><br>[root@w-openstack20 /data/nova/instances/7898b630-c4ef-49ab-9ce9-3735e090c282]# file disk<br>disk: QEMU QCOW Image (v3), has backing file (path /data/nova/instances/_base/3f27393376152ac352b2d85703011e38517e), 429496729600 bytes<br></blockquote><br>Oh, you're using delta/snapshot based qcow images. That, by it's<br>very nature, generates fragmented image files as they are a delta<br>over the backing file.<br><br>....<br><blockquote type="cite">actual 48421430, ideal 20716, fragmentation factor 99.96%<br><br>How can I solve this problem, what do you suggest me to do?<br></blockquote><br>Use a extent size hint (say 1-8MB) for your qcow2 image files so that<br>they don't fragment badly as they are written to. <br><br>Cheers,<br><br>Dave.<br>-- <br>Dave Chinner<br><a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.com</a><br></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>---<br>Blog: <a href="http://www.chenzongzhi.info" target="_blank">http://www.chenzongzhi.info</a><br>Twitter: <a href="https://twitter.com/#%21/baotiao" target="_blank">https://twitter.com/baotiao</a><br>Git: <a href="https://github.com/baotiao" target="_blank">https://github.com/baotiao</a><br></div></div></div>
</div>