Disk usage accuracy

SYSTEM INFORMATION
OS type and version Debian 11
Virtualmin version 7.5

I just created a new box that I put Virtualmin on. Fresh minimal install of Debian 11. Debian had PHP 7.4 on it so I added PHP 8.0, 8.1, and 8.2 to it.

I am curious about the accuracy of the “Disk usage” in the notification bar. The notification indicates this:
Mounted As ---- Free --------------------- Total
/ ---------------------- 95% (8.55 TiB) ----- 9.02 TiB
/boot -------------- 74% (346.5 MiB) – 470.35 MiB

The box has no websites other then the default box name and a couple megabytes there to serve up a default page.

Some math calculations tell me, based on the indicated “Disk usage” that the space consumed on the box is some 470 gigabytes. That seems to be way off for a new box.

I did this from / on the box:
du -h
and got a result of 8.6 G which actually makes sense.

Out of curiosity, I then checked my original Debian 10 box with Virtualmin on it. The “Disk usage” notification area on that one indicates this:
Mounted As ---- Free ---------------------- Total
/ ---------------------- 89% (194.52 GiB) - 220.31 GiB
/boot -------------- 36% (83.54 MiB) – 233.32 MiB

Doing this from / on that box:
du -h
yields a result of 18 G which actually makes sense because it has a number of websites on it.

Thanks for any thoughts on this!
Charles

df -h Formatting on your post is a bit off so I can’t ell for sure but it looks like 89% free on /?

It was:
du -h
I did on both boxes to compare against what the Virtualmin/Webmin notification panel indicated. And yes, the second box I checked disk usage on had 89% free.

It didn’t seem feasible that a freshly loaded box was using almost 500 gigabytes of disk space.

I was simply stating that the output from df -h is more readable for over all disk usage. df = disk free.

I’d have to think the “disk usage” in the notification bar would give the same information. The question was about the accuracy of that notification.

Ok, now I understand what you mean (LOL).

I did this at the consoles and got these for each box:

Filesystem --------------------------- Size — Used - Avail - Use% - Mounted on
udev ------------------------------------- 31G 0 31G 0% /dev
tmpfs ----------------------------------- 6.2G 1.4M 6.2G 1% /run
/dev/mapper/box1–vg-root - 9.1T 7.9G 8.6T 1% /
tmpfs ----------------------------------- 31G 0 31G 0% /dev/shm
tmpfs ----------------------------------- 5.0M 0 5.0M 0% /run/lock
/dev/sda2 ---------------------------- 471M 100M 347M 23% /boot
tmpfs ----------------------------------- 6.2G 48K 6.2G 1% /run/user/0
tmpfs ----------------------------------- 6.2G 44K 6.2G 1% /run/user/114
tmpfs ----------------------------------- 6.2G 48K 6.2G 1% /run/user/1000

and for the second box I got:

Filesystem ------------------------------- Size — Used - Avail - Use% - Mounted on
udev ---------------------------------------- 3.8G 0 3.8G 0% /dev
tmpfs -------------------------------------- 772M 82M 691M 11% /run
/dev/mapper/box2–vg-root — 221G 15G 195G 7% /
tmpfs ------------------------------------- 3.8G 0 3.8G 0% /dev/shm
tmpfs ------------------------------------- 5.0M 4.0K 5.0M 1% /run/lock
tmpfs ------------------------------------ 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sda1 ----------------------------- 234M 138M 84M 63% /boot
tmpfs ------------------------------------ 772M 4.0K 772M 1% /run/user/112
tmpfs ------------------------------------ 772M 8.0K 772M 1% /run/user/0

So this indicates that the notification bar may be calculated differently somehow?

A 500 gigabyte difference is quite a bit. Is this a bug in how the disk usage and space available is displayed in Virtualmin/Webmin?

I’m starting to think there must be something going on with this.
I’m showing a place holder website showing 291M in the gui.
image

root@main:/home/fight# du -hs 2.8M
That’s 2 orders of magnitude off!

OK. Definitely something off with disk usage reporting. I wrote a script to move emails. Went into the interface to check and had a cow. This user is an old friend and I don’t think he’s ever deleted an email. But, I knew going in how big his account was. When I went in and looked I saw:

image

That’s three times the size it should be? I had created the accounts a couple weeks ago and was using it to test the transfer. Had rsync really created dupes? My account looked normal.

So I went ‘commando’. :wink:

root@main:/home/ooon/homes/glass # du -hs
11G

You’re looking at quota usage for a domain. That’s not the same as doing du on a single mail user’s home.

Yeah, it appears to be double (or triple/quadruple/whatever) tmpfs filesystems, or something. I see a minor discrepancy, as well. I’ll ask @Ilia to take a look.

1 Like

@charlesworks @ID10T

Can you please provided the following:

  1. A screenshot of Disk Usage accordion, i.e.:
  2. Local disk space row in the Dashboard, i.e.:
  3. df -h command output, i.e.:
    [root@alma9-pro ~]# df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    devtmpfs                    4.0M     0  4.0M   0% /dev
    tmpfs                       631M     0  631M   0% /dev/shm
    tmpfs                       253M  8.7M  244M   4% /run
    /dev/mapper/almalinux-root   14G  3.3G   11G  24% /
    /dev/sda1                  1014M  315M  700M  32% /boot
    tmpfs                       127M     0  127M   0% /run/user/0
    

Note! Use Preformatted text button in the editor toolbar, or hit Ctrl+E or ⌘+E to wrap your df -h command output, e.g.:

Do not use dashes to replace spaces, there is fixed width fonts to do that for you!


2.
image
3.

udev                   7.8G     0  7.8G   0% /dev
tmpfs                  1.6G  956K  1.6G   1% /run
/dev/md1               3.9G  853M  3.1G  22% /
/dev/vg00/usr          9.8G  3.2G  6.1G  35% /usr
tmpfs                  7.9G  144K  7.9G   1% /dev/shm
tmpfs                  5.0M     0  5.0M   0% /run/lock
none                   7.9G   44K  7.9G   1% /tmp
/dev/mapper/vg00-home  504G  135G  349G  28% /home
/dev/mapper/vg00-var    50G   13G   35G  26% /var
tmpfs                  1.6G     0  1.6G   0% /run/user/0

Webmin currently doesn’t consider reserved disk space when displaying used space. The next Webmin release will fix that.

1 Like

Thanks for looking into this, Ilia. Have been away so couldn’t get back to answer this. Will look forward to the fix!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.