<div dir="ltr"><div><div><div><div><div><div>Simon,<br><br></div>What is happening is that when we create a preallocated disk on NFS, we fill the file with zeros in order to "allocate" the space.<br></div>However, while copying the disk we use qemu-img that will ignore the zeros.<br></div><div><br></div>Quick way to demonstrate:<br><br>[root@white-vdsd test]# dd if=/dev/zero of=myfile.txt bs=1M count=1<br>1+0 records in<br>1+0 records out<br>1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00172084 s, 609 MB/s<br><br>[root@white-vdsd test]# du -h myfile.txt<br>1.0M myfile.txt<br><br>[root@white-vdsd test]# ls -lh myfile.txt<br>-rw-r--r-- 1 root root 1.0M Aug 7 12:39 myfile.txt<br><br>[root@white-vdsd test]# qemu-img convert myfile.txt myfile2.txt<br><br>[root@white-vdsd test]# ls -lh myfile2.txt<br>-rw-r--r-- 1 root root 1.0M Aug 7 12:41 myfile2.txt<br><br>[root@white-vdsd test]# du -h myfile2.txt<br>0 myfile2.txt<br><br>[root@white-vdsd test]# qemu-img info myfile.txt<br>image: myfile.txt<br>file format: raw<br>virtual size: 1.0M (1048576 bytes)<br>disk size: 1.0M<br><br>[root@white-vdsd test]# qemu-img info myfile2.txt<br>image: myfile2.txt<br>file format: raw<br>virtual size: 1.0M (1048576 bytes)<br>disk size: 0<br><br></div>I hope this explains what you see.<br><br></div>Regards,<br></div>Fred<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 7, 2016 at 11:13 AM, Simon Barrett <span dir="ltr"><<a href="mailto:Simon.Barrett@tradingscreen.com" target="_blank">Simon.Barrett@tradingscreen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p dir="auto">Storage is NFS. What logs would you like to see?</p>
<p dir="auto">Many thanks.</p><span class="HOEnZb"><font color="#888888">
<p dir="auto">Simon<br>
</p></font></span><div><div class="h5">
<br>
<br>
<br>
<div class="gmail_quote">On Sun, Aug 7, 2016 at 8:53 AM +0100, "Fred Rolland" <span dir="ltr">
<<a href="mailto:frolland@redhat.com" target="_blank">frolland@redhat.com</a>></span> wrote:<br>
<br>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>Simon hi,<br>
<br>
</div>
What storage type are you using in source and target storage domains ? (NFS, ISCSI....)<br>
<br>
</div>
<div>Can you share the logs?<br>
</div>
<div><br>
</div>
Thanks,<br>
</div>
Fred<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Aug 5, 2016 at 6:37 PM, Simon Barrett <span dir="ltr">
<<a href="mailto:Simon.Barrett@tradingscreen.com" target="_blank">Simon.Barrett@tradingscreen.<wbr>com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="color:#1f497d">Another example. This one was moved to a new storage domain<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">root@ovirt_host1> qemu-img info dd6f25f6-7830-4024-915f-a20268<wbr>797c34<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">image: dd6f25f6-7830-4024-915f-a20268<wbr>797c34<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">file format: raw<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">virtual size: 200G (214748364800 bytes)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">disk size: 5.0G<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">root@ ovirt_host1> cat dd6f25f6-7830-4024-915f-a20268<wbr>797c34.meta<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DOMAIN=53560d43-874a-49c5-9c5a<wbr>-8b90487c79f8<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">VOLTYPE=LEAF<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">CTIME=1470305678<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">FORMAT=RAW<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">IMAGE=741976cd-d1cb-4031-bdbe-<wbr>6a745dff16ef<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DISKTYPE=2<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">PUUID=00000000-0000-0000-0000-<wbr>000000000000<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">LEGALITY=LEGAL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">MTIME=0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">POOL_UUID=<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">SIZE=419430400<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">TYPE=PREALLOCATED<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DESCRIPTION=<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">EOF<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">This one has not been moved:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">root@ny2-lvb-066.mgt> qemu-img info 155f0d33-c280-4236-8d1e-fcb88f<wbr>9a1242<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">image: 155f0d33-c280-4236-8d1e-fcb88f<wbr>9a1242<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">file format: raw<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">virtual size: 90G (96636764160 bytes)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">disk size: 90G<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">root@ny2-lvb-066.mgt> cat 155f0d33-c280-4236-8d1e-fcb88f<wbr>9a1242.meta<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DOMAIN=59bde2ff-e10d-477e-91c1<wbr>-6355abff0999<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">CTIME=1464946639<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">FORMAT=RAW<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DISKTYPE=2<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">LEGALITY=LEGAL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">SIZE=188743680<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">VOLTYPE=LEAF<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">DESCRIPTION={"DiskAlias":"ny2-<wbr>laa-010.prod_Disk1","DiskDescr<wbr>iption":""}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">IMAGE=82158182-81a4-458e-a41b-<wbr>663756962666<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">PUUID=00000000-0000-0000-0000-<wbr>000000000000<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">MTIME=0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">POOL_UUID=<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">TYPE=PREALLOCATED<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">EOF<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">See the mismatch between “virtual size” and “disk size” on the one that was moved.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">TIA,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_4265245599051383173_m_-1913405386986670952__MailEndCompose"><span style="color:#1f497d"><u></u> <u></u></span></a></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:users-bounces@ovirt.org" target="_blank">
users-bounces@ovirt.org</a> [mailto:<a href="mailto:users-bounces@ovirt.org" target="_blank">users-bounces@ovirt.or<wbr>g</a>]
<b>On Behalf Of </b>Simon Barrett<br>
<b>Sent:</b> Friday, 5 August, 2016 10:25<br>
<b>To:</b> <a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a><br>
<b>Subject:</b> [ovirt-users] preallocated storage issue?<u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If I create a preallocated disk for a VM, I see the disk image file listing as the size I requested (100G):<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">cd /rhev/data-center/mnt/storage_<wbr>host1:_vol_pa1__nas__01b__oVir<wbr>t__prod__01/53560d43-874a-49c5<wbr>-9c5a-8b90487c79f8/images/d97f<wbr>7706-3662-40bf-9358-80e0dc51bf<wbr>f4<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">root@ovirt_host> ls -l<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">total 105064644<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-rw---- 1 vdsm kvm 107374182400 Aug 5 10:57 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-rw---- 1 vdsm kvm 1048576 Aug 5 10:57 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.lease<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-r--r-- 1 vdsm kvm 313 Aug 5 10:57 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.meta<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">and the corresponding space used on disk matches<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">root@ ovirt_host > du -sh *<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">101G 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">1.1M 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.lease<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">4.0K 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.meta<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If I then migrate that storage (while the VM is shutdown) to a new storage domain, the size on disk does not match the allocated size. In this case there is nothing in the disk yet so it shows as 0.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">cd /rhev/data-center/mnt/storage_<wbr>host2:_vol_pa1__ovirt__uatprod<wbr>/1f2c2b48-1e77-4c98-a6da-<wbr>5dc09b78cead/images/d97f7706-<wbr>3662-40bf-9358-80e0dc51bff4<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">root@ ovirt_host> ls -l<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">total 1032<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-rw---- 1 vdsm kvm 107374182400 Aug 5 11:06 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-rw---- 1 vdsm kvm 1048576 Aug 5 11:06 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.lease<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">-rw-r--r-- 1 vdsm kvm 313 Aug 5 11:06 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.meta<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">root@ ovirt_host > du -sh *<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">0 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">1.1M 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.lease<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">4.0K 75c14559-e18f-4cc8-a3fe-bc0de5<wbr>07720b.meta<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">oVirt still lists the disk as preallocated in the GUI but it is in fact thin provisioned.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I see the same issue if I clone a preallocated VM. The size on disk ends up being the equivalent of a thin-provisioned disk. I also had the issue when importing VM’s from an export domain when I had selected preallocated in the import dialog
box.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is this a known issue? Should preallocated not mean preallocated on physical disk?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Ovirt Engine is running 3.6.4.1-1.el6<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The ovirt nodes are running: <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">OS Version: RHEL - 7 - 2.1511.el7.centos.2.10<u></u><u></u></p>
<p class="MsoNormal">Kernel Version: 3.10.0 - 327.4.5.el7.x86_64<u></u><u></u></p>
<p class="MsoNormal">KVM Version: 2.3.0 - 31.el7_2.7.1<u></u><u></u></p>
<p class="MsoNormal">LIBVIRT Version: libvirt-1.2.17-13.el7_2.2<u></u><u></u></p>
<p class="MsoNormal">VDSM Version: vdsm-4.17.23.2-0.el7.centos<u></u><u></u></p>
<p class="MsoNormal">SPICE Version: 0.12.4 - 15.el7<u></u><u></u></p>
<p class="MsoNormal">GlusterFS Version: [N/A]<u></u><u></u></p>
<p class="MsoNormal">CEPH Version: librbd1-0.80.7-3.el7<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Many thanks,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Simon<u></u><u></u></p>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</blockquote></div><br></div>