<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 07/26/2014 08:50 PM, Kir Kolyshkin
      wrote:<br>
    </div>
    <blockquote cite="mid:53D47703.5020601@openvz.org" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      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 moz-do-not-send="true" 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>
    </blockquote>
    <br>
    I just discovered that my analysis are not entirely correct
    (although the result<br>
    is correct, it's just the details), so here's a small update.<br>
    <br>
    vzctl set --diskinodes is ignored for ploop, as there is no way to
    change the number<br>
    of inodes for already-created file system (so --diskinodes can only
    be specified on<br>
    creation).<br>
    <br>
    Now, it seems that the sample configuration file used on creation:<br>
    <br>
    &gt; vzctl create 134 --layout ploop --diskspace
    262144000K:262144000K \<br>
    &gt; &nbsp; --ostemplate debian-7-amd64-minimal --config vswap-solus<br>
    <br>
    i.e. vswap-solus sample config file
    (/etc/vz/conf/ve-vswap-solus.conf-sample)<br>
    actually contains DISKINODES=<span style="white-space: pre;">131072000
      line which is used by vzctl create.<br>
      I can't tell it for sure since you don't provide the file itself
      but I don't see any other explanation<br>
    </span><br>
    <br>
    <blockquote cite="mid:53D47703.5020601@openvz.org" type="cite"> <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 moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true"
        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>
    </blockquote>
    <br>
  </body>
</html>