<p><br>
01.06.2012 10:13 пользователь &quot;Massimiliano&quot; &lt;<a href="mailto:massimiliano.sciabica@kiiama.com">massimiliano.sciabica@kiiama.com</a>&gt; написал:<br>
&gt;<br>
&gt; Hi Keith,<br>
&gt; I&#39;m quite sure XFS is the &quot;problem&quot;.<br>
&gt; Kirill response is techincally perfect and his knowledge is far ahead of mine, I would have not even imagined that disk quota might be implied. But I suggest you to have a try with ext4 or ext3, the both work fine, even with any tuning option you may need.</p>

<p>Ext4 (since you will be able to use ploop) </p>
<p>&gt;<br>
&gt;<br>
&gt; On 31/05/2012 23:41, Keith Keller wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello all, thanks for the quick responses!<br>
&gt;&gt;<br>
&gt;&gt; On 2012-05-31, Kirill Kolyshkin&lt;<a href="mailto:kolyshkin@gmail.com">kolyshkin@gmail.com</a>&gt;  wrote:<br>
&gt;&gt;   <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Assuming you don&#39;t have DISK_QUOTA=no in global config (ie /etc/vz/vz.conf),<br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; That&#39;s correct.<br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; the figures shown come from vzquota, and in order for vzquota to work correctly<br>
&gt;&gt;&gt; when you want to copy something to container you have to have it mounted (ie<br>
&gt;&gt;&gt; vzctl status 21 should show the word &#39;mounted&#39; among others) and copy the<br>
&gt;&gt;&gt; data to VE_ROOT (ie /vz/root/21) but not to VE_PRIVATE (/vz/private/21).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you have already done it wrong (I assume you did *), you have to recalculate<br>
&gt;&gt;&gt; vzquota, the easiest way is to stop container, do vzquota drop 21 and<br>
&gt;&gt;&gt; start container<br>
&gt;&gt;&gt; again. This should fix your issue.<br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; You are indeed correct that I originally copied data to /vz/private/21.<br>
&gt;&gt; But when I attempted to drop the quota, it still reports 0 blocks used.<br>
&gt;&gt; I wonder if Massimiliano&#39;s comment is relevant?<br>
&gt;&gt;<br>
&gt;&gt; On 2012-05-31, Massimiliano<br>
&gt;&gt; &lt;<a href="mailto:massimiliano.sciabica@kiiama.com">massimiliano.sciabica@kiiama.com</a>&gt;  wrote:<br>
&gt;&gt;   <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; I had a similar issue when I first tried to improve performance of VPS<br>
&gt;&gt;&gt; with high number of small files.<br>
&gt;&gt;&gt; When a VPS reports 0% usage it is usually due to a not ext2 family<br>
&gt;&gt;&gt; filesystem. What fs where you using?<br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; I am using XFS.  The FAQ mentions that disk quotas do not work with XFS,<br>
&gt;&gt; so perhaps that&#39;s why it isn&#39;t displaying quite right (see below).<br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I believe this is because of file system crash and the fsck (or journal replay)<br>
&gt;&gt;&gt; which truncated your files. In other words, this is not directly<br>
&gt;&gt;&gt; related to what you have described above.<br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; Perhaps--on boot, I didn&#39;t notice any unusual messages from fsck, though<br>
&gt;&gt; I admit I wasn&#39;t paying an enormous amount of attention, and the logs<br>
&gt;&gt; don&#39;t have anything interesting to report either.  Does OpenVZ do a lot<br>
&gt;&gt; of caching of disk writes from within a container?  (It&#39;s obviously too<br>
&gt;&gt; late now to see what xfs_repair thinks of the filesystem, but FWIW it<br>
&gt;&gt; didn&#39;t find anything unusual.)<br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Speaking of kernel crashes, it&#39;s nice to have some console logger installed,<br>
&gt;&gt;&gt; such as netconsole so whenever you have an oops you can report the bug.<br>
&gt;&gt;&gt; See <a href="http://wiki.openvz.org/Remote_console_setup">http://wiki.openvz.org/Remote_console_setup</a><br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; Yes, I just set this up after the first crash--silly oversight not to<br>
&gt;&gt; have done it right away.  :)<br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; # Disk quota parameters (in form of softlimit:hardlimit)<br>
&gt;&gt;&gt;&gt; DISKSPACE=&quot;1000G:2000G&quot;<br>
&gt;&gt;&gt;&gt;       <br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It looks like you have set disk quota values to more than your really<br>
&gt;&gt;&gt; have. Since this doesn&#39;t make sense<br>
&gt;&gt;&gt; my question is -- did you meant to disable disk space limit entirely?<br>
&gt;&gt;&gt; If yes, you can just have<br>
&gt;&gt;&gt; DISK_QUOTA=no in this config.<br>
&gt;&gt;&gt;     <br>
&gt;&gt;<br>
&gt;&gt; Well, I am not entirely sure what I want, to be honest.  If it&#39;s true<br>
&gt;&gt; that having VE_ROOT and VE_PRIVATE on an XFS filesystem means disk<br>
&gt;&gt; quotas don&#39;t work right, then perhaps I should either use ext3 (or<br>
&gt;&gt; ext4?) on that filesystem, or disable disk quotas for all containers.<br>
&gt;&gt;<br>
&gt;&gt; As an experiment on the latter, I set DISK_QUOTA=no in vz.conf, and now<br>
&gt;&gt; I get:<br>
&gt;&gt;<br>
&gt;&gt; # vzctl exec 21 df -h<br>
&gt;&gt; Filesystem            Size  Used Avail Use% Mounted on<br>
&gt;&gt; /dev/simfs            1.0T  332G  693G  33% /<br>
&gt;&gt; none                   16G  4.0K   16G   1% /dev<br>
&gt;&gt;<br>
&gt;&gt; But it would be convenient to have disk quotas.  Is there a preference<br>
&gt;&gt; for ext3 or ext4 for the host filesystem?<br>
&gt;&gt;<br>
&gt;&gt; --keith<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;   <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>