diff options
author | Tony Hutter <[email protected]> | 2021-11-09 16:50:18 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-09 16:50:18 -0800 |
commit | ae70d628ff1ff8b26ce2ba1debd334191d78bd7d (patch) | |
tree | 3e4e2d212f7951b8cb52469b56884b24ba87d022 /cmd/zpool | |
parent | e39fe05b69e4d78311c5c25a8dc21b0b1dca2409 (diff) |
zed: Control NVMe fault LEDs
The ZED code currently can only turn on the fault LED for
a faulted disk in a JBOD enclosure. This extends support
for faulted NVMe disks as well.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes #12648
Closes #12695
Diffstat (limited to 'cmd/zpool')
-rwxr-xr-x | cmd/zpool/zpool.d/ses | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/zpool/zpool.d/ses b/cmd/zpool/zpool.d/ses index f6b7520df..b1836d676 100755 --- a/cmd/zpool/zpool.d/ses +++ b/cmd/zpool/zpool.d/ses @@ -41,7 +41,13 @@ for i in $scripts ; do val=$(ls "$VDEV_ENC_SYSFS_PATH/../device/scsi_generic" 2>/dev/null) ;; fault_led) - val=$(cat "$VDEV_ENC_SYSFS_PATH/fault" 2>/dev/null) + # JBODs fault LED is called 'fault', NVMe fault LED is called + # 'attention'. + if [ -f "$VDEV_ENC_SYSFS_PATH/fault" ] ; then + val=$(cat "$VDEV_ENC_SYSFS_PATH/fault" 2>/dev/null) + elif [ -f "$VDEV_ENC_SYSFS_PATH/attention" ] ; then + val=$(cat "$VDEV_ENC_SYSFS_PATH/attention" 2>/dev/null) + fi ;; locate_led) val=$(cat "$VDEV_ENC_SYSFS_PATH/locate" 2>/dev/null) |