Wrong used disk space in VirtualMin

Hello fellow VirtualMin users,

I just installed VirtualMin 1,534 on Debian 6,0,1 x64 and I also have a "used disk space display issue". Indeed, when I click on "Edit Virtual Server", under "Quotas and limits", I get the following:

Home disk space used (including sub-servers) -8 kB (7.61 GB by server administrator, 0 bytes by mail / FTP users)

It seems that I have the same error as this user: http://www.virtualmin.com/node/16805

"Looks like it doesn't make the sum between the mail /FTP users quote and the server administrator's one and juste remove the quote of the database."

I printed some debug information from the function "show_domain_quota_usage" of file "./virtual-server/virtual-server-lib-funcs.pl". So here are they (this virtual server has both "Total server quota" and "Server administrator's quota" set to unlimited and just has files in its home directory):

$homequota: 0
$mailquota: 0
$duser: HASH(0x438d870)
$dbquota: 8192
$dbquota_home: 8192
$subhomequota: 0
$submailquota: 0
$dummy:
$subdbquota: 0
$totalhomequota: 0
$totalmailquota:
$bsize: 1024

After line "$totalhomequota -= $dbquota_home/$bsize;", the concerned variable becomes:

$totalhomequota: -8

So it seems the disk space usages returned by both 'get_domain_user_quotas' & 'get_domain_quota' are wrong.

Tristan

Status: 
Closed (fixed)

Comments

We recently found a bug that can cause this on some Debian 6 systems. The fix is to download and install the 1.535 Webmin version from http://download.webmin.com/devel/deb/ , with commands like :

cd /tmp
wget "http://download.webmin.com/devel/deb/webmin_1.535_all.deb"
dpkg --install webmin_1.535_all.deb

The next full Webmin release (1.540) will also include the fix.

JamieCameron,

Once I saw your reply, I immediately installed this new version and it fixed the problem under the "Edit Virtual Server" page.

But there is maybe something you need to be aware of : Right after I submitted this bug issue, I noticed the "Quotas" part of the "System Information" was displaying an error message (division by 0). I thinked this new bug was linked to this current one.

After your update, this error was still here and I had to "Re-Check Configuration" to get rid of it.

So maybe you need to add something to your update script for the next version to clear some cache or update some values for people who might be subject to this current bug.

By the way, thanks again for both your prompt reply and your solution.

Tristan

.

Yes, that would be a side-effect of the same bug. The System Information page data is cached, so it wouldn't be fixed until manually refreshed, or until the background refresh happens after a few minutes..

Automatically closed -- issue fixed for 2 weeks with no activity.