Skip to content

Add ZED email notification for SUSPENDED pool state #18151

@kwt5152

Description

@kwt5152

Describe the feature you would like to see added to OpenZFS

It appears that the ZFS Event Daemon (ZED) does not currently send notifications when a pool enters the SUSPENDED state. One of the hosts I manage encountered this condition:

WARNING: Pool 'tank' has encountered an uncorrectable I/O failure and has been suspended.

This event was logged to syslog, but no email notification was generated by ZED. I was unable to find any existing ZED configuration option or zedlet that would trigger an email specifically for a suspended pool state. Assuming a pool suspension is considered a state change, it appears that the default statechange-notify.sh zedlet does not account for it and only filters for the following values:

if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \
        && [ "${ZEVENT_VDEV_STATE_STR}" != "DEGRADED" ] \
        && [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ] \
        && [ "${ZEVENT_VDEV_STATE_STR}" != "UNAVAIL" ]; then
    exit 3
fi

I may be overlooking an existing or preferred mechanism for handling notifications for this condition. If no such mechanism exists, I would like to request that pool suspension events trigger a ZED email notification by default.

How will this feature improve OpenZFS?

This would allow ZFS administrators to receive ZED alerts when a pool enters a SUSPENDED state. Currently, administrators who rely on ZED email notifications for monitoring pool health and availability may not be alerted when a pool becomes completely unavailable due to suspension.

Given that a suspended pool halts all I/O and requires administrative intervention, notifying on this state would improve observability and reduce time-to-detection for critical failures.

Additional context

This issue occurred on an Ubuntu 22 host with the following versions:

OS: Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Kernel: 5.15.0-164-generic
ZFS Packages:

  • zfs-2.1.5-1ubuntu6~22.04.6
  • zfs-kmod-2.1.5-1ubuntu6~22.04.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: FeatureFeature request or new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions