<p dir="ltr"><br>
On Sep 12, 2012 11:20 PM, &quot;Corin Langosch&quot; &lt;<a href="mailto:info@corinlangosch.com">info@corinlangosch.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; it seems that when creating &amp; deleting files inside a ploop backed container the backing image file doesn&#39;t shrink. So the image file is still consuming around 400 GB, while in the container df shows only 100 GB in use.<br>

&gt;<br>
&gt; ll on host: -rw------- 1 root root 384G Sep 12 21:06 root.hdd<br>
&gt; df on container: /dev/ploop1           493G  103G  390G  21% /</p>
<p dir="ltr">We have online shrink. It&#39;s &quot;ploop balloon discard&quot; or just &quot;vzctl compact&quot;. You&#39;d better have ploop and vzctl from git (both are really close to be released).</p>
<p dir="ltr">&gt;<br>
&gt; I assume this is because ploop doesn&#39;t get informed by the ext4 fs when blocks are no longer in use. Should it help to to mount the ext4 on the ploop device with the &quot;discard&quot; option? I didn&#39;t test if it helps yet, but at least I was able to pass the mount option (thanks to kir&#39;s recent enhancements) and it started the container without any problems.<br>

&gt;<br>
&gt; /dev/ploop1 on / type ext4 (rw,relatime,barrier=0,data=ordered,discard)<br>
&gt;<br>
&gt; To free all &quot;free&quot; existing blocks I also tried to do a batch cleanup/ trim from inside the container using &quot;fstrim /&quot; but it doesn&#39;t work:<br>
&gt;<br>
&gt; root@test:~# fstrim /<br>
&gt; fstrim: /: FITRIM ioctl failed: Operation not permitted<br>
&gt;<br>
&gt; Should this be working or is it not supported yet? Am I on the right path at all? Any better solutions? :)<br>
&gt;<br>
&gt; Corin<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openvz.org">Users@openvz.org</a><br>
&gt; <a href="https://openvz.org/mailman/listinfo/users">https://openvz.org/mailman/listinfo/users</a><br>
</p>