From 3207803abf6a9131c4ae99a0fb4a906c40d86401 Mon Sep 17 00:00:00 2001 From: Marcel Menzel Date: Wed, 14 Dec 2022 02:26:10 +0100 Subject: [PATCH] Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names Outgoing mails for ZFS pool events include the pool GUID, but not the actual pool name. Let's change this for better readability, as it is already done in the mails for finished pool resilvers. Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: George Melikov Reviewed-by Richard Yao Signed-off-by: Marcel Menzel Closes #14272 --- cmd/zed/zed.d/statechange-notify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zed/zed.d/statechange-notify.sh b/cmd/zed/zed.d/statechange-notify.sh index ab11dfbc99..8d7a531915 100755 --- a/cmd/zed/zed.d/statechange-notify.sh +++ b/cmd/zed/zed.d/statechange-notify.sh @@ -37,7 +37,7 @@ if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \ fi umask 077 -note_subject="ZFS device fault for pool ${ZEVENT_POOL_GUID} on $(hostname)" +note_subject="ZFS device fault for pool ${ZEVENT_POOL} on $(hostname)" note_pathname="$(mktemp)" { if [ "${ZEVENT_VDEV_STATE_STR}" = "FAULTED" ] ; then @@ -65,7 +65,7 @@ note_pathname="$(mktemp)" [ -n "${ZEVENT_VDEV_GUID}" ] && echo " vguid: ${ZEVENT_VDEV_GUID}" [ -n "${ZEVENT_VDEV_DEVID}" ] && echo " devid: ${ZEVENT_VDEV_DEVID}" - echo " pool: ${ZEVENT_POOL_GUID}" + echo " pool: ${ZEVENT_POOL} (${ZEVENT_POOL_GUID})" } > "${note_pathname}"