User Quota Recalculation

14 posts / 0 new
Last post
#1 Sat, 07/28/2007 - 21:49
StevenBurns

User Quota Recalculation

I have an account who's quota was exceeded during mailserver testing. While the filesystem only 55M usage, Virtualmin still shows 128.14M. I have been unable to find a way to reset this figure.

If this is reset on a schedule, is there a way to configure it?

Virtualmin version 3.44

If anyone can help it would be much appreciated. Thanks in advance.

Post edited by: StevenBurns, at: 2007/07/28 21:50<br><br>Post edited by: StevenBurns, at: 2007/07/28 21:53

Sat, 07/28/2007 - 23:17
Joe
Joe's picture

Quotas are in some cases calculated, and in others the OS &quot;just knows&quot; (disk quotas are always valid, or should be unless something strange has been done with the filesystem). So, there are occasions where recalculation is necessary. Luckily, Virtualmin can do it for you:

Open up the System Settings menu, and click &quot;Check Disk Quotas&quot;

Then click the &quot;Check Now&quot; button. Wait a while (maybe a long while, if you have a lot of data), and it should all sync up again.

--

Check out the forum guidelines!

Mon, 07/30/2007 - 02:27 (Reply to #2)
StevenBurns

<div class='quote'>You're not telling us where you're getting the &quot;drive summary&quot; from. It could be incorrect, as different file system utilities add up sizes differently</div>

Please see attached. The disk summary is gathered with the command line prompt and &quot;du -sh&quot;. The domain in question is &quot;befungle&quot;. In the bottom section of the attachment shows a screenshot from vituralmin &quot;Edit Virtual Server&quot; and &quot;Quotas and limits&quot; section.

Command line shows 54M, no db, no mail storage (or minimal). The Virtual Min shows the 128M status.

One note: Originally I had this domains set with a hard limit of 100 megs. When that got exceeded I made it unlimited - cleared the files and got it running again. However, since that time I can not get the quota calculation to reflect what I see from the drive.

<div class='quote'>As far as I know the quota checking in Virtualmin is sane and correct...but there might be a bug on some OS/version. You'll want to add that information to this thread if the behavior your seeing is bug-like.</div>

It is seeming bug like - but I'm still open to user error. I'm not new to unix, but I am new to virtualmin. My OS is Centos version 5/64 bit.

Mon, 07/30/2007 - 02:40 (Reply to #3)
Joe
Joe's picture

No screenshot here. Note that the forum only allows images 499x499 or smaller.

What does the Webmin Disk Quotas page for the befungle group show? Since databases are small, that's the only factor I can think of that would be wrong, and the solution would be to force a new quota check with the Check Quotas button I mentioned above.

If Disk Quotas is showing data that looks right to you (e.g. roughly 54M) then I'll ask Jamie to drop in on this thread for further troubleshooting advice.

--

Check out the forum guidelines!

Mon, 07/30/2007 - 14:24 (Reply to #4)
StevenBurns

Screen shot attached (with good sizes) Could not edit my previous post for some reason.

<div class='quote'>What does the Webmin Disk Quotas page for the befungle group show? Since databases are small, that's the only factor I can think of that would be wrong, and the solution would be to force a new quota check with the Check Quotas button I mentioned above.</div>

The Webmin Disk Quotas show the same 128 megs. I'm at a loss as to where it's coming from (or why it won't go away.)

Mon, 07/30/2007 - 14:28 (Reply to #5)
StevenBurns

screenshot is unreadable at 50k. Doesn't really show anything I don't have said on here (just presented as &quot;proof&quot; of the odd issue).

Sun, 07/29/2007 - 19:26
StevenBurns

I may be missing something. I have checked the drive summary for the user's home folder. It is showing 54 megs - The mysql databases are almost non-existent. Yet the Quota in Virtualmin shows as 125. Further, I've not seen the notifications of the exceeded come in any of the admin or user emails.

This is a test domain I'm using for configuring and testing before going full production on this machine. I would like to know better what areas are being calculated (other standard folder or system parameters). For the production I do need to make sure the Quota system is active and functioning correctly.

Again, any assistance is appreciated. If there are specific questions you need me to answer or show to you, let me know.

Thanks!

Sun, 07/29/2007 - 22:40 (Reply to #7)
Joe
Joe's picture

Howdy Steven,

Hard to say. You're not telling us where you're getting the &quot;drive summary&quot; from. It could be incorrect, as different file system utilities add up sizes differently (and sometimes the differences can be dramatic, though this seems a bit overly dramatic).

Are your mailboxes in /home? If they're stored elsewhere, they might make a difference. Databases are tiny when empty, but can balloon up pretty quick. You might check them by looking in /var/lib/mysql (or wherever your databases live) and checking the size with:

du -xh domain

As far as I know the quota checking in Virtualmin is sane and correct...but there might be a bug on some OS/version. You'll want to add that information to this thread if the behavior your seeing is bug-like.

But before deciding that it's bug-like, let's look to see what the system quotas are saying...Browse to the Webmin:System:Disk Quotas module and see what the system is reporting for usage (click on the /home (groups) link)...this number is added to Virtualmin's calculated numbers to get the total usage. Obviously, if this number accounts for most of the 125M you're seeing, then it's a system level issue.

I thought the Check Disk Quotas feature caused the system quotacheck command to run, but maybe it assumes the system is right, since it's pretty odd circumstances that lead to it being incorrect. If you think the system quota is reporting wrong, try running the &quot;Check Quotas&quot; button in the Disk Quotas Webmin module (this will take a while).

--

Check out the forum guidelines!

Wed, 08/01/2007 - 14:54
StevenBurns

FOUND IT!!!!! In the /tmp folder I found 7 directories created by the clamav process. Once removed, the mysterious 78 or so extra megs went away.

Thanks for the help.

Thu, 08/02/2007 - 06:52 (Reply to #9)
Joe
Joe's picture

Awesome! Thanks for the update. That's a good one to add to the wiki for troubleshooting common problems. Clam (and a few others) can create tmp files that might lead to confusing results. (Also take this as a lesson that processing mail can result in surprisingly large disk usage. It's good reason to keep quotas a bit larger than you think you'll need.)

--

Check out the forum guidelines!

Fri, 08/31/2007 - 10:55 (Reply to #10)
elabmexico

Are the clamav files in /tmp supposed to stay there? or what is the best option for clearing those files every so often to be able to have a more realistic mailbox quota report?

Alonso

Fri, 08/31/2007 - 11:06 (Reply to #11)
Joe
Joe's picture

No, they shouldn't stick around beyond the time it takes to process things.

You might try removing those, and see if similar files re-appear. It might be a broken-ness in the clamav version/package you have there (is it our clamav package?).

--

Check out the forum guidelines!

Fri, 08/31/2007 - 11:24 (Reply to #12)
elabmexico

Yes, I am using your clamav package.
I removed all related files and folders from /tmp but wasn't careful enough to check the dates on them. If I am not mistaken, they were created before the latest clamav update a few days back.

I'll keep an eye and let you know if they start accumulating again.

Wed, 09/05/2007 - 20:08 (Reply to #13)
elabmexico

Removing the files solved my problem, they have not accumulated again.

Topic locked