Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4188 FreeBSD9.1 - ZFS - Disk Space incorrectly calculated

1.610
closed-fixed
Jamie Cameron
5
2014-02-27
2013-01-24
Musclegeek
No

I installed PCBSD9.1 (Based on FreeBSD9.1) on a 16GB USB stick. The default FS is ZFS with root.

When I installed Webmin the "System Information" displays "Local disk space" as "117.74 GB total, 3.95 GB used".

This is impossible. I think Webmin is calculating all of the ZFS mounts as separate disks or FS's and adding them together.

I also noticed on FreeBSD Webmin does not show Partitions on local disks.

Discussion

  • Jamie Cameron
    Jamie Cameron
    2013-01-24

    What does the `df -k` command output on your system?

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-12

    Ok, I've found the bug that causes this now .. and will include a fix in the next Webmin release.

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-12

    • status: open --> closed-fixed
     
  • Marco Schilder
    Marco Schilder
    2014-01-05

    I still have this issue, 1.660, Ubuntu 12.04 LTS. The system has 1x60GB for the OS and 4x2TB for storage (ZFS). Webmin shows 37.10TB local storage, it is counting all the mounts as every ZFS volume has a new local mount.

     
  • Jamie Cameron
    Jamie Cameron
    2014-01-05

    I recently found another bug that can cause this, which will be fixed in the 1.670 Webmin release.

     
  • Marco Schilder
    Marco Schilder
    2014-01-19

    Updated to release 1.670, problem still exists.

     
  • Jamie Cameron
    Jamie Cameron
    2014-01-19

    Unfortunately 1.670 introduced a different bug in the computation of total disk space. But this will be fixed in 1.680, which should be out next week (promise!)

     
  • Marco Schilder
    Marco Schilder
    2014-02-16

    Any idea when the 1.680 update will be available? :)

     
  • Jamie Cameron
    Jamie Cameron
    2014-02-17

    A fix for this is also available in version 1.675, which is available from http://www.webmin.com/devel.html

     
  • Marco Schilder
    Marco Schilder
    2014-02-19

    I'm afraid updating to 1.675 didn't solve it. Is there any way I can provide you with some extra information, a standard checklist sort a way? Something that gives you a hint about maybe something I configured in a wrong or different way than usual.
    Don't get me wrong! I have a lot of appreciation for the work you put in this, but perhaps it is more guessing as solving right now :) I do get the idea behind Open Source where you do this all 'free of charge', if there is anything I could help you with/troubleshoot I would gladly do that.

     
  • Jamie Cameron
    Jamie Cameron
    2014-02-20

    Marco - can you post the output of the following commands :

    df -h
    mount
    cat /etc/mtab

     
  • Marco Schilder
    Marco Schilder
    2014-02-24

    Certainly :)

    mschilder@nas:~$ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 23G 7.4G 15G 34% /
    udev 3.7G 4.0K 3.7G 1% /dev
    tmpfs 1.5G 540K 1.5G 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 3.7G 0 3.7G 0% /run/shm
    cgroup 3.7G 0 3.7G 0% /sys/fs/cgroup
    /dev/sda1 94M 124K 94M 1% /boot/efi
    data 2.0T 384K 2.0T 1% /data
    data/apps 2.1T 54G 2.0T 3% /data/apps
    data/backup 2.1T 41G 2.0T 2% /data/backup
    data/documents 2.0T 1.9G 2.0T 1% /data/documents
    data/downloads 2.1T 101G 2.0T 5% /data/downloads
    data/dreambox 2.0T 256K 2.0T 1% /data/dreambox
    data/kvm 2.0T 17G 2.0T 1% /data/kvm
    data/movies 3.4T 1.4T 2.0T 42% /data/movies
    data/music 2.1T 107G 2.0T 5% /data/music
    data/owncloud 2.0T 2.4G 2.0T 1% /data/owncloud
    data/pictures 2.1T 23G 2.0T 2% /data/pictures
    data/scanner 2.0T 258M 2.0T 1% /data/scanner
    data/timemachine 2.1T 95G 2.0T 5% /data/timemachine
    data/tvshows 3.4T 1.4T 2.0T 41% /data/tvshows
    data/videos 2.1T 60G 2.0T 3% /data/videos
    data/xbmc 2.0T 30M 2.0T 1% /data/xbmc

    mschilder@nas:~$ mount
    /dev/sda2 on / type ext4 (rw,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    none on /sys/firmware/efi/efivars type efivarfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
    cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
    /dev/sda1 on /boot/efi type vfat (rw)
    data on /data type zfs (rw)
    data/apps on /data/apps type zfs (rw)
    data/backup on /data/backup type zfs (rw)
    data/documents on /data/documents type zfs (rw)
    data/downloads on /data/downloads type zfs (rw)
    data/dreambox on /data/dreambox type zfs (rw)
    data/kvm on /data/kvm type zfs (rw)
    data/movies on /data/movies type zfs (rw)
    data/music on /data/music type zfs (rw)
    data/owncloud on /data/owncloud type zfs (rw)
    data/pictures on /data/pictures type zfs (rw)
    data/scanner on /data/scanner type zfs (rw)
    data/timemachine on /data/timemachine type zfs (rw)
    data/tvshows on /data/tvshows type zfs (rw)
    data/videos on /data/videos type zfs (rw)
    data/xbmc on /data/xbmc type zfs (rw)
    rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
    nfsd on /proc/fs/nfsd type nfsd (rw)

    mschilder@nas:~$ cat /etc/mtab
    /dev/sda2 / ext4 rw,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
    none /sys/fs/fuse/connections fusectl rw 0 0
    none /sys/kernel/debug debugfs rw 0 0
    none /sys/kernel/security securityfs rw 0 0
    none /sys/firmware/efi/efivars efivarfs rw 0 0
    udev /dev devtmpfs rw,mode=0755 0 0
    devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
    tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
    none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
    none /run/shm tmpfs rw,nosuid,nodev 0 0
    cgroup /sys/fs/cgroup tmpfs rw,relatime,mode=755 0 0
    cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
    cgroup /sys/fs/cgroup/cpu cgroup rw,relatime,cpu 0 0
    /dev/sda1 /boot/efi vfat rw 0 0
    data /data zfs rw 0 0
    data/apps /data/apps zfs rw 0 0
    data/backup /data/backup zfs rw 0 0
    data/documents /data/documents zfs rw 0 0
    data/downloads /data/downloads zfs rw 0 0
    data/dreambox /data/dreambox zfs rw 0 0
    data/kvm /data/kvm zfs rw 0 0
    data/movies /data/movies zfs rw 0 0
    data/music /data/music zfs rw 0 0
    data/owncloud /data/owncloud zfs rw 0 0
    data/pictures /data/pictures zfs rw 0 0
    data/scanner /data/scanner zfs rw 0 0
    data/timemachine /data/timemachine zfs rw 0 0
    data/tvshows /data/tvshows zfs rw 0 0
    data/videos /data/videos zfs rw 0 0
    data/xbmc /data/xbmc zfs rw 0 0
    rpc_pipefs /run/rpc_pipefs rpc_pipefs rw 0 0
    nfsd /proc/fs/nfsd nfsd rw 0 0

     
  • Jamie Cameron
    Jamie Cameron
    2014-02-25

    Thanks - and in your case, what are the total and free disk space shown as?

     
  • Marco Schilder
    Marco Schilder
    2014-02-25

    That's another thing; the total amount varies ;) It used to be around 43TB, yesterday it was about 35.2TB and now it is 34.93TB. And I haven't changed anything to the filestructure for about 2 months now.

    The used space right now is 3.21TB.

     
    Last edit: Marco Schilder 2014-02-25
  • Jamie Cameron
    Jamie Cameron
    2014-02-26

    Ok, it looks like the reason is that ZFS mounts are being counted multiple times. What does the command "zpool list" output on your system?

     
  • Marco Schilder
    Marco Schilder
    2014-02-26

    This is the output:

    mschilder@nas:~$ sudo zpool list
    [sudo] password for mschilder:
    NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
    data 7.25T 4.41T 2.84T 60% 1.00x ONLINE -

     
  • Jamie Cameron
    Jamie Cameron
    2014-02-26

    Thanks. So how large is your "data" pool exactly? What is confusing Webmin is that according to df there are several mounts pools like data/apps , data/videos, etc that have different sizes. And yet I assume they all share the same actual pool of space?

     
  • Marco Schilder
    Marco Schilder
    2014-02-27

    The data pool consists of 4x 2TB in RAIDZ (so that leaves roughly 5,8TB) with a SSD for caching and logging.

    Now that you mention, it seems indeed that Linux as an OS has a struggle to determine the total disk size too. Perhaps this is not really a Webmin problem, rather a ZFS/Ubuntu problem?

     
  • Jamie Cameron
    Jamie Cameron
    2014-02-27

    Yeah, the concept of "free disk space" in ZFS is unclear. In your case, the sum total of the sizes of all your ZFS mounts (as shown by df -h) is greater than the 5.8 TB that is actually in the ZFS pool!