Skip to content

Commit

Permalink
Notify on UNAVAIL statechange
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Mazzoli <f@mazzo.li>

`UNAVAIL` is maybe not quite as concerning as `DEGRADED`, but still an
event of notice, in my opinion. For example it is triggered when a
drive goes missing.
  • Loading branch information
bitonic committed Oct 14, 2021
1 parent afbc617 commit d739497
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/zed/zed.d/statechange-notify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Send notification in response to a fault induced statechange
#
# ZEVENT_SUBCLASS: 'statechange'
# ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED' or 'REMOVED'
# ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED', 'REMOVED', or 'UNAVAIL'
#
# Exit codes:
# 0: notification sent
Expand All @@ -31,7 +31,8 @@

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

Expand Down

0 comments on commit d739497

Please sign in to comment.