Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ilyam8
Copy link
Member

@ilyam8 ilyam8 commented Jan 9, 2026

Summary

Fixes: #21518

Problem

When a ZFS pool runs out of disk space, the diskspace collector triggers separate alerts for every dataset in the pool. For pools with hundreds of datasets, this creates massive alert/notification floods.

Root Cause

The diskspace collector treats each ZFS dataset as a separate mountpoint and calls stat() on every one. When the parent pool fills up, all child datasets are affected simultaneously, triggering alerts for each one.

Solution

Exclude ZFS datasets from diskspace monitoring, keeping only ZFS pool-level mountpoints. This is done by checking the mount source field in /proc/self/mountinfo:

  • ZFS pools have no slash in the source name (e.g., tank)
  • ZFS datasets contain slashes (e.g., tank/install, tank/u/user1)
Test Plan
Additional Information
For users: How does this change affect me?

Summary by cubic

Prevents alert floods in diskspace monitoring by excluding ZFS datasets and monitoring only ZFS pools.

  • Bug Fixes
    • Skip ZFS datasets detected via mount_source containing a slash in /proc/self/mountinfo (e.g., tank/install).
    • Continue monitoring pool-level mountpoints without a slash (e.g., tank) so alerts fire once per pool.

Written for commit 0c0ff65. Summary will update on new commits.

@ilyam8 ilyam8 requested a review from thiagoftsm as a code owner January 9, 2026 18:58
@github-actions github-actions bot added area/collectors Everything related to data collection collectors/diskspace labels Jan 9, 2026
@ilyam8 ilyam8 force-pushed the diskspace-exclude-zfs-datasets branch from 140bbca to 0c0ff65 Compare January 9, 2026 18:59
@ilyam8 ilyam8 requested a review from Copilot January 9, 2026 18:59
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes an alert flood issue that occurs when ZFS pools run out of disk space. Previously, the diskspace collector would trigger separate alerts for every dataset in a ZFS pool (potentially hundreds), creating massive notification floods.

Key Changes:

  • Added is_zfs_dataset() function to detect ZFS datasets vs pools by checking for slashes in the mount_source field
  • Modified do_disk_space_stats() to skip ZFS datasets, monitoring only ZFS pool-level mountpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ilyam8 ilyam8 merged commit 27574be into netdata:master Jan 9, 2026
122 checks passed
@ilyam8 ilyam8 deleted the diskspace-exclude-zfs-datasets branch January 9, 2026 19:58
stelfrag pushed a commit to stelfrag/netdata that referenced this pull request Jan 10, 2026
@stelfrag stelfrag mentioned this pull request Jan 10, 2026
Ferroin pushed a commit that referenced this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection collectors/diskspace

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: In ZFS pool 'disk full' situation, netdata floods alerts for every ZFS dataset in the pool

2 participants