<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;">> On 23/07/14 09:34, Kir
Kolyshkin wrote:<br>
><br>
> I just talked with a L3 Supporter of SolusVM and they told
me that<br>
> 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;">><br>
> What SolusVM basically does is this on creation of the
container:<br>
><br>
> <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;">> 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;">> 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>
</blockquote>
<br>
I would like to add that previously SolusVM was passing "unlimited"
to --diskinodes<br>
for vzctl set, which transforms to LONG_MAX (9223372036854775807
(2^63 - 1)<br>
on an x86_64 architecture) which is definitely way too high and
resulted in a<br>
ploop image creation error ("size too large" or something like
this). So, it seemed<br>
like a regression in vzctl 4.7 (compared to vzctl 4.6 which just
ignored diskinodes<br>
value for ploop-based CTs), but is in fact a bug in SolusVM which
was uncovered<br>
by a new vzctl feature.<br>
<br>
Now, instead of fixing it, apparently they just changed "unlimited"
to 131072000,<br>
which is not as insane as "unlimited" but still not sane for smaller
CTs (a sane<br>
default would be to omit diskinodes altogether)<br>
<br>
<blockquote cite="mid:53D47703.5020601@openvz.org" type="cite"> <br>
<span style="white-space: pre;">><br>
> And this is the reinstallation process of the container:<br>
><br>
> <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://ezcrypt.it/cg9n#sHQJeiV7Y6bl6zyBBjS60oLN">https://ezcrypt.it/cg9n#sHQJeiV7Y6bl6zyBBjS60oLN</a><br>
><br>
> Where the config looks exactly like this:<br>
><br>
> <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. <shameless plug> 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>
</shameless plug><br>
<br>
Kir.<br>
<br>
</blockquote>
<br>
</body>
</html>