Notify on UNAVAIL statechange

`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.

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Francesco Mazzoli <f@mazzo.li>
Closes #12629
Closes #12630
This commit is contained in:
Francesco Mazzoli 2021-10-16 00:57:23 +02:00 committed by Tony Hutter
parent f31b45176c
commit 487bb77623
1 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@
# Send notification in response to a fault induced statechange # Send notification in response to a fault induced statechange
# #
# ZEVENT_SUBCLASS: 'statechange' # ZEVENT_SUBCLASS: 'statechange'
# ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED' or 'REMOVED' # ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED', 'REMOVED', or 'UNAVAIL'
# #
# Exit codes: # Exit codes:
# 0: notification sent # 0: notification sent
@ -31,7 +31,8 @@
if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \ if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \
&& [ "${ZEVENT_VDEV_STATE_STR}" != "DEGRADED" ] \ && [ "${ZEVENT_VDEV_STATE_STR}" != "DEGRADED" ] \
&& [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ]; then && [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ] \
&& [ "${ZEVENT_VDEV_STATE_STR}" != "UNAVAIL" ]; then
exit 3 exit 3
fi fi