quotas reporting incorrect disk space usage

Running Virtualmin 3.69 gpl on Centos 5.3

On the system information page (first one that comes up after login as root) the disk space shown in the quotas section is incorrect.

The first virtual machine is called "bogus.lan" (without the quotes!) with a home directory of /home/bogus/ and was set up to capture references to websites with names resolving to this IP address but not hosted here. On the system information page, this first virtual server shows disk space usage of 530MB. Logging into a shell account, going to /home and typing "du -h bogus" gives a total of 2.1M used, which appears to be accurate. Other than what is set up by default with a virtual server, there are three files in the public_html folder, sizes are 8462, 985 and 36 BYTES respectively.

The pattern for the sizes on the System Information page seems to be that the space reported is the cumulative amount of space used for the current virtual server and all virtual servers installed after the current server.

virtual server 2 shows 484MB on System information page, du calculates 488 MB, that appears ok

virtual server 3 shows 125.07MB on System information page, du calculates 235MB.

virtual server 4 shows 118.28mb on SI page, du calculates 124MB, this server has a number of subservers.

the rest appear reasonably accurate.

Anyone have any ideas what’s going on? Is there a setting I should have set or unset?


Well, remember that the quota is including space taken up by databases (in /var/lib/mysql) as well as any temp files – such as those in /tmp and /var/tmp.

Is it possible those users have files they own outside of their homedir?

/tmp has a total of 28k
/var/tmp has 8k
/var/lib/mysql/bogus has one file (db.opt) 63 bytes

of course it is possible those users have files outside their homedir, however I set up all those users and uploaded their websites so unless I (or the software) did this inadvertently, it probably didn’t happen.


What happens if you log into Virtualmin as root, go into Limits and Validation -> Check Disk Quotas, and checking user and group quotas on all filesystems. Then re-visit the Edit Virtual Server page for the problem domain, and see if the numbers are correct now.

My guess is that the System information page calculates disk space with "df", and you are checking it with "du".

They usually give different readings even though they report the same thing because they caculate it differently… and I can’t remember the specifics but I believe among other things du does NOT count files that exist in memory but not on disk, and df does. I think du counts the bits on the disk and df counts based on block size and etc., etc.,etc.

You can find this info out there somewhere I’m sure.

The quota report is actually coming from the quota commands on the system…and are based on the actual filesystem quota usage. So, if Virtualmin is reporting it, it is exactly what the system quotas think is being used. (But, there are places where Virtualmin does add things up using du. It might also use df for the quick filesystem specs…I’m not sure. But, per-user quota information is definitely coming only from the disk quotas information the system has for that user.)

Well, if I could read “quota” and not see “disk usage” I wouldn’t sound so retarded.

But, I apparently can’t. Darn.

Well, if I could read "quota" and not see "disk usage" I wouldn't sound so retarded.

I get confused about what we’re talking about and say something stupid at least once daily around here. Don’t feel too bad. :wink:

It’s why I yell at people who pick up old threads with new problems. It has a tendency to make me look stupid as I start talking about the original problem, and I hate looking stupid. So, instead I just rant at the person who failed to start a new thread.

well my quota for usage terminology is filled and my brain is hung up on du du! :slight_smile:

The quotas on the system information page appear to be correct, but not an issue. I think I set them up all as soft quotas anyway. I was just checking the quota section to review actual usage.

mrwilder, you should retract your retraction, you had it right the first time. Also, I checked the man pages for df and du, and my take on it is that df is for a device (the whole disk) and du can do a set of files (du -ahc /home/bogus will show just what is in and below that directory).

audreycheck’s idea seemed good, especially when I saw the page heading

This page allows you to validate disk usage on your system, to bring the counts maintained by the quota system into sync with the actual disk space used. This may take some time for large filesystems."

I tried that, but alas, bogus still shows 530MB used.

Could it be that because the directory is named bogus, the system thinks it’s appropriate to give me a bogus number?

I have got an issue that might be related to the discussion above. I’m on VM 2.70 Pro.
Systeminformation says:

Festplattenplatz 689.16 GB gesamt, 40.99 GB benutzt [Disk space used]

and df on the command line as root says:

[root@sr01 /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/md2 688G 6.2G 647G 1% / /dev/md1 2.0G 91M 1.9G 5% /boot

hmmm … that’s quite a difference, you agree?

Any idea how to fix this?



I have got the same problem… is there already a solution?