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