Skip to content

Pulse Host Agent over-reports usable storage on ZFS (TrueNAS) due to dataset AVAIL summation #718

@ak-tr

Description

@ak-tr

Describe the bug

Pulse host agent reports incorrect usable storage size on ZFS systems (TrueNAS SCALE).
Instead of reporting the pool’s actual usable capacity, it sums the AVAIL value for every ZFS dataset, resulting in massively inflated storage numbers.

Example:
A TrueNAS system with a single ~5.05 TB usable ZFS pool is reported in Pulse as ~46 TB usable because there are multiple datasets, each showing the same 5.05 TB AVAIL value. The agent treats them as independent filesystems and adds them together.

This leads to misleading storage metrics, incorrect % usage, and incorrect alerting.

To Reproduce

  1. Install the Pulse host agent on a TrueNAS SCALE host using the install script.
  2. Go to Reporting → Hosts → Storage in Pulse.
  3. Observe that the “usable” capacity is multiplied by the number of ZFS datasets instead of matching the ZFS pool’s actual capacity.

Expected behavior

Pulse should detect ZFS pools and report pool-level capacity, not sum the “available” values for each dataset.
All ZFS datasets share the same underlying pool storage, so their AVAIL values represent the same free space and should not be aggregated.

Expected behaviour:

  • Report each ZFS pool once.
  • Do not treat child datasets as separate storage volumes.
  • Show accurate usable storage values that match zpool list or the TrueNAS UI.

Environment

  • Pulse Version: Latest (installed via install-docker-agent.sh as of Feb 2025)
  • Installation Type: Manual host agent on TrueNAS SCALE (not Docker)

Additional context

Below is the textual output of zfs list (dataset names anonymized).
Each dataset reports the same 5.05 TB AVAIL value, even though the pool has only 5.05 TB total usable capacity:

poolname                             5.05T
poolname/.system                     5.05T
poolname/.system/configs-*           5.05T
poolname/.system/cores               5.05T
poolname/.system/nfs                 5.05T
poolname/.system/samba4              5.05T
poolname/.system/vm                  5.05T
poolname/user1                       5.05T
poolname/user2                       5.05T

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions