<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 07/26/2014 12:45 PM, Kevin Holly wrote:<br>
    <span style="white-space: pre;">&gt; On 23/07/14 09:34, Kir
      Kolyshkin wrote:<br>
      &gt;<br>
      &gt; I just talked with a L3 Supporter of SolusVM and they told me
      that<br>
      &gt; this seems to be a well known vzctl bug.</span><br>
    <br>
    Great, can they point out to a bug in bugzilla.openvz.org?<br>
    <br>
    <span style="white-space: pre;">&gt;<br>
      &gt; What SolusVM basically does is this on creation of the
      container:<br>
      &gt;<br>
      &gt; <a class="moz-txt-link-freetext" href="https://ezcrypt.it/ag9n#QcRKRX8DIFdFKJv6ZNFahTSt">https://ezcrypt.it/ag9n#QcRKRX8DIFdFKJv6ZNFahTSt</a></span><br>
    <br>
    Thanks for providing this!<br>
    <br>
    Lots of weird/stupid things overall... But let's stay on topic.<br>
    <br>
    Here is the first relevant line:<br>
    <br>
    <span style="white-space: pre;">&gt; vzctl create 134 --layout ploop
      --diskspace 262144000K:262144000K [...]</span><br>
    <br>
    Here they set diskspace to 250G on creation.<br>
    <br>
    And this is the second relevant line:<br>
    <br>
    <span style="white-space: pre;">&gt; vzctl set 134 --diskspace
      262144000K:262144000K --diskinodes 131072000:131072000 --save</span><br>
    <br>
    Here they resize it with 250G diskspace and 131072000 of diskinodes.<br>
    <br>
    Now, ext4 reserve one inode per 16KB of diskspace on filesystem
    creation<br>
    (you can think of it as a heuristic that an average file is 16KB of
    size), and<br>
    there is no way to change a number of inodes on an existing
    filesystem.<br>
    Well, there is one -- you need to resize the filesystem itself.<br>
    <br>
    As vzctl is told that 131072000 of diskinodes are required, it
    resizes the<br>
    file system to the size sufficient to hold the requested number of
    inodes,<br>
    which is 131072000*16K, or 2TB. Then, as diskspace is set to 250G,
    vzctl<br>
    steals the rest of the space by using an invisible hidden (empty)
    balloon file.<br>
    So, while the internals are tricky, the result is exactly as
    requested, i.e.<br>
    a filesystem with (about) 250 GB of diskspace, but with 131072000
    inodes.<br>
    <br>
    Now, if I can, I'd say that the number of inodes requested is way
    too high<br>
    for the given disk space, unless it's really going to be used to
    hold that<br>
    high number of small (about 2K on average) files.<br>
    <br>
    <span style="white-space: pre;">&gt;<br>
      &gt; And this is the reinstallation process of the container:<br>
      &gt;<br>
      &gt; <a class="moz-txt-link-freetext" href="https://ezcrypt.it/cg9n#sHQJeiV7Y6bl6zyBBjS60oLN">https://ezcrypt.it/cg9n#sHQJeiV7Y6bl6zyBBjS60oLN</a><br>
      &gt;<br>
      &gt; Where the config looks exactly like this:<br>
      &gt;<br>
      &gt; <a class="moz-txt-link-freetext" href="https://ezcrypt.it/dg9n#g2Ico8AknpAtJbAcxkbBQDub">https://ezcrypt.it/dg9n#g2Ico8AknpAtJbAcxkbBQDub</a></span><br>
    <br>
    This adds nothing new to the picture and is in line with that<br>
    was seen before.<br>
    <br>
    Now, back to "vzctl bug" that they say exist in versions newer than
    4.6.1.<br>
    This diskinodes handing for ploop was added in vzctl 4.7, before
    that<br>
    diskinodes value was ignored for ploop.<br>
    <br>
    Hope that helps. &lt;shameless plug&gt; By the way, we accept
    donations now, so if you feel like<br>
    helping us back, too, feel free:
    <a class="moz-txt-link-freetext" href="http://openvz.livejournal.com/48757.html">http://openvz.livejournal.com/48757.html</a> &lt;/shameless plug&gt;<br>
    <br>
    Kir.<br>
    <br>
  </body>
</html>