Disk Size Displayed Incorrectly: bug?

In a CentOS 6.2 (both host and guest) KVM setup, I have the disk space (in the VM) showing as TWICE what it actually is (via system information). I already tried rebooting the VM. See http://easycaptures.com/fs/uploaded/579/1835449109.png

In the host, the only disks that exist (mounted on LVM) are:

> cd /var/lib/libvirt/images/
> ls -al
total 30817412
drwx--x--x 2 root root        4096 Jun 13 09:39 .
drwxr-xr-x 9 root root        4096 Jun 26 01:50 ..
-rw------- 1 qemu qemu  8589934592 Jun 27 15:27 kvm1-1.img
-rw------- 1 qemu qemu 21474836480 Jun 27 15:28 kvm1.img

In the guest,

> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos62-lv_root
                       19G  8.9G  9.1G  50% /
tmpfs                 3.2G     0  3.2G   0% /dev/shm
/dev/vda1             485M   90M  370M  20% /boot
>cat /etc/mtab
/dev/mapper/vg_centos62-lv_root / ext4 rw,grpquota,usrquota 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/vda1 /boot ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/tmp /tmp none rw,bind 0 0
/var/tmp /var/tmp none rw,bind 0 0
/home /home none rw,bind 0 0

the only thing I've done recently regarding disks was set "barrier=off" option in grub

How do I get Webmin to correctly read disk space?

Thanks

Status: 
Closed (fixed)

Comments

Could you post the /etc/fstab and /etc/mtab files from the VM?

Also, which Webmin version is the VM running?

The current version as of today.

I should also note that the VM where Webmin is installed is hosted via KVM on CentOS 6.2, using as virtual HDs .img files that reside on a LVM.

#
# /etc/fstab
# Created by anaconda on Wed Jun 13 02:42:59 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_centos62-lv_root  /  ext4  grpquota,usrquota,rw  0  1
UUID=bb756d7c-5946-4608-bec5-08411daa875e /boot                   ext4    defaults        1 2
/dev/mapper/vg_centos62-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/mapper/vg_centos62-lv_root / ext4 rw,grpquota,usrquota 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/vda1 /boot ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/tmp /tmp none rw,bind 0 0
/var/tmp /var/tmp none rw,bind 0 0
/home /home none rw,bind 0 0

Thanks for your fstab and mtab info!

Can you confirm the exact Webmin version though? The Webmin version can differ based on what distro is being used, and how Webmin was installed.

You can determine that by logging into Virtualmin, and in the "System Information" screen it'll show a Webmin version. The expected version for CentOS 6.2 installed with the install.sh script would be "1.585". Alternatively, it could show "1.590" if you're using a development version.

I think I see the issue here - you have a loopback mount listed in /etc/mtab for /home to itself!

That will confuse Virtualmin's disk usage calculation, as it will treat /home as a separate filesystem even though it really shares space with the / filesystem.

I will fix Virtualmin in the next release to handle this case better.

in the meanwhile, would you mind telling me how to edit fstab and correct that loopback please? There should be no reason to have it there, correct?

thanks!

I'm not actually sure how to remove that permanently, as /home doesn't appear to be listed in /etc/fstab

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