Hi, I has been experiencing a very strange issue with Wembin "System Information > Local disk space", after few hours the "Local disk space" start reporting an extremelly inflated local disk space data;
After trying to find cause for days with no luck, I decided to report this problem with images and system disk usage right after and before the issue, only solution I've found was just rebooting the server for now, unfortunately the issue start right after few hours.
System report during normal state:
Normal State Data txt
System report during wrong state:
Wrong State Data txt
Testing system info:
Webmin: 1.880, 1.881 (default install)
OS: Vanilla FreeBSD 11.1 RootOnZFS
MB: Supermicro X8SI6-F
CPU: Xeon X3450
RAM: 16GB DDR3 ECC RDIMMs.
OS Disk: 1x 250GB, GPT/ZFS Stripe
Data Disk: 6x 320GB, GPT/ZFS RAIDZ2
Regards
The stats in the theme rely on
mount::local_disk_space. This really odd issue, I have never seen it happening.Jamie, what do you think could be the cause of the issue?
Hi, thanks for the prompt response, I forgot to add that restarting Webmin, switching between themes has no effect, so I guess is more likely a core issue.
However, I re-installed and setup latest FreeBSD 11.1 | Webmin on my system, I will update on any finds.
EDIT: Unfortunately right after the fresh setup, the strange disk usage started to raise rapidly again just after one hour:

Latest System Data txt
Regards
Last edit: J.M. Rivera 2018-05-04
What does the
df -hcommand output on this system?Hi Jamie, each picture have a link below with all relevant information during each system state for convenience, however, I will give you the requested info.
Regards
Oh, you're running ZFS .. that makes calculating free local disk space a lot harder!
What does the
zpool list -Pandzpool list -pcommands output on your system?Heres is zpool list -p
Regards
If you run the
mountcommand, is the type of those filesystems shown aszfs?Yes, all my filesystems in the server are ZFS, ecxept for a shared directory which is a Read-Only NULLFS, heres the output for "mount":
Regards
Hello just an update on this, I think I found the cause and actually what I thought, seems that Webmin free disk space code is counting and summing out every ZFS snapshots(if they set as visible) as additional files/file systems, even if the snapshots started at ZERO disk usage, and is easily reproduced on VM as well on my hardware.
The more spanpshots I create(obiously they ZERO disk usage since no files changed), the more the Local disk space usage in Webmin increases.
Definitely the snapshots(.zfs) should be excluded except the space portion they using wen files changes, but not the wole snapshot at all.
How to reproduce this issue
Enable ZFS snapshot visibility with:
Trow few large files inside the created dataset.
Star creating a lot of snapshots of that dataset as much as you can with:
Then look at how the space usage start increasing on Webmin status page, also clean browser cache several times as seems Webmin takes some time to prossess this info.
Regards.
Ok, that could explain it. Are these snapshots shown when you run
df -h?Hi,
df -hcommand does not show the zfs snapshots, indeed it would be a really bad idea if it will(theres too many), though I left them hidden for now as I can cd to them regardless if visible or not, since that I haven't noticed that odd disk space I was experiencing before.Regards
Do they show up in
/etc/mtab(or the equivalent on FreeBSD) though?No they aren't shown in /etc/fstab nor any other file that I know.
Maybe I will try reproduce this on ZFS on Linux too, I'm really curious about this.
Is there a command to determine which directories are mounted on ZFS snapshots and which are not?
Hi, mounted zfs snapshots will be populated and displayed with the standard mount system command.
However I will post an deeper test on this issue for some clarificastions.(note that my zfs pool/datasets all has compression LZ4 enabled)
Testing on: FreeBSD 11.1 P10
================================================
Single dataset testing with 'du' command
Report for directory "/mnt/storage/mymedia"(with zfs set snapdir=hidden storage/mymedia):
Report for directory "/mnt/storage"(theres 3 datasets in there, all with snapshots but hidden):
Report for directory "/mnt/storage"(theres 3 datasets in there, all with snapshots visible):
Report for whole directory "/mnt":
My real disk usage is:
I think Webmin should calculate space as individual zpool basis gathering information from the available zfs commands sush as 'zpool list' for acurate results.
Regards
EDITED: 05-29-2018
Last edit: J.M. Rivera 2018-05-29
I found on CPAN the Filesys-ZFS-1.5 > Filesys::ZFS I think that perl module could be handy for working with ZFS overall Regards
Yeah, maybe looking at mounted filesystems is a mistake - does
zpool listshow total disk space available and free in ZFS?Hi, yes,
zpool listandzpool list -pgives per pool disk raw data usage statistics(raid parity usage included), however Oracle have some writings about this topic HERE.Regards
On the other hand, that would include disk space that hasn't been made available to the system yet, so wouldn't be accurate to include either..
Right, maybe gathering/including information right from
zpool listshould suffice for each imported/available zfs pools on the system, exported and/or unformatted/unallocated drives should be ignored indeed.Heres the sample output of

zpool liston my FreeBSD testing system,zpool listalready provides human readable information, whilezpool list -pprovides parsable and exact number values: