Menu

#5269 ZFS used/available disk space issue

1.910
closed-fixed
nobody
zfs (2)
5
2019-06-10
2019-05-23
No

Hi,

In the latest webmin release there is a nice new tab in dashboard "Disk usage", however for my ZFS array it shows incorrect data, see attachment.
Besides the total system disk volume is calculated wrong - in my case is shows total disk space 155TB which is 4 times more than real.

I guess it might be a zfs/ubuntu issue, but still it looks wrong. Are there any hints on how to make this look correct?

Here is zpool list -Poutput:

NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
zfs   36.2T  4.62T  31.6T         -     2%    12%  1.00x  ONLINE  -
1 Attachments

Discussion

  • Ilia

    Ilia - 2019-05-23

    Hi, Dima.

    Is the output of Disk and Network Filesystems (mount) module produces the same incorrect results?

     
  • Dmitry Ogurtsov

    Dmitry Ogurtsov - 2019-05-23

    Yes:

    /zfs            ZFS zfs             0%  Да  Нет
    /zfs/Backup     ZFS zfs/Backup      2%  Да  Нет
    /zfs/Download   ZFS zfs/Download    0%  Да  Нет
    /zfs/Multimedia ZFS zfs/Multimedia  11% Да  Нет
    /zfs/Public     ZFS zfs/Public      0%  Да  Нет
    /zfs/Seafile    ZFS zfs/Seafile     0%  Да  Нет
    
     
  • Jamie Cameron

    Jamie Cameron - 2019-05-23

    That zpool output looks odd - normally it's shown in bytes or kilobytes, with no suffix.

    Is there an extra flag needed to zpool list on your system?

     
  • Dmitry Ogurtsov

    Dmitry Ogurtsov - 2019-05-23

    Not really. zpool list output is exactly the same.
    It shows correct array size.

     
  • Jamie Cameron

    Jamie Cameron - 2019-05-26

    Which Linux distribution / operating system and version is this on?

     
  • Dmitry Ogurtsov

    Dmitry Ogurtsov - 2019-05-26

    It's Ubuntu server 18.04.2

     
  • Jamie Cameron

    Jamie Cameron - 2019-05-26

    I forgot to ask - what does zpool list -p output?

     
  • Dmitry Ogurtsov

    Dmitry Ogurtsov - 2019-05-27

    Hello Jamie,
    here it is:

    NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
    zfs   39857296506880  5012741709824  34844554797056         -      2     12   1.00  ONLINE  -
    
     
  • Jamie Cameron

    Jamie Cameron - 2019-05-27
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2019-05-27

    Ok, I see the problem now - this will be fixed in the next Webmin release.

     
  • Firm Administrator

    We recently updated to Webmin 1.9.10 on a VPS hosted by DigitalOcean running FreeBSD 11.2-Release-p9 (Generic) with ZFS and encountered an error that is likely related to this problem. When the Dashboard tried to load, the following error was reported: “mount::list_system_info failed : Illegal division by zero at /usr/local/lib/webmin-1.910/mount/system_info.pl line 31.” Commenting out line 31, which is “my $free_percent = 100 - int(($total - $free) / $total * 100);” avoids the error. Disk usage always shows as 100%, as it always has.

     
  • Ilia

    Ilia - 2019-06-06

    This issue has been fixed a while ago:

    https://github.com/webmin/webmin/issues/1060

     
  • Firm Administrator

    Thanks! Uploading the new system_info.pl file fixed the divide by zero error. My search for “system_info.pl” did not find that closed issue for some reason.

    Regarding ZFS used/available disk space, Webmin still reports “Error! Warning! The 416 kB filesystem mounted at /var/lib/cloud/seed/config_drive has no free disk space!” Webmin knows that this is a ISO9660 CD-ROM (actually virtual) read-only disk, as shown by edit_mount.cgi. Warning that a read-only disk image has no free space for writing data is unnecessary, and confuses users, especially users of Virtualmin. Hopefully, the next version of Webmin will address this issue by excluding read-only volumes. This would align with the corrected calculation of available disk space on writable ZFS storage volumes. Thanks again.

     
  • Jamie Cameron

    Jamie Cameron - 2019-06-08

    Good point, we won't show that warning on CDs in future.

     
  • Firm Administrator

    Thanks. As a final note for completeness and clarity, the circle graph of local disk space on the Dashboard should show the percentage of space used relative to the root filesystem. That filesystem is correctly identified as “/ (Root filesystem) ZFS zroot/ROOT/default” on the Disk and Network Filesystems page of Webmin, but the circle graph now always displays 100% as the local disk space used on “/dev/vtbd1” mounted as “/var/lib/cloud/seed/config_drive” which is the read-only ISO9660 CD-ROM image described above. Dashboard display of the space used on the root filesystem would be useful.

     

Log in to post a comment.

Monday.com Logo