mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
zed: fix typo in variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT
Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.
Note this changes the user-visible string in zed.rc, thus might
break current users with the wrong string, but it's ~2 months
since zfs-2.2.0 tag is out, thus should not be widespread yet.
Mechanical change:
$ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
cmd/zed/zed.d/zed.rc
cmd/zed/zed.d/statechange-slot_off.sh
$ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/<linebreak>
ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' \
cmd/zed/zed.d/zed.rc \
cmd/zed/zed.d/statechange-slot_off.sh
$ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
$
Fixes 11fbcacf37
("zed: Add zedlet to power off slot when drive is faulted")
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Closes #15651
This commit is contained in:
parent
08fd5ccc38
commit
9bb8d26bd5
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Bad SCSI disks can often "disappear and reappear" causing all sorts of chaos
|
# Bad SCSI disks can often "disappear and reappear" causing all sorts of chaos
|
||||||
# as they flip between FAULTED and ONLINE. If
|
# as they flip between FAULTED and ONLINE. If
|
||||||
# ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
|
# ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
|
||||||
# FAULTED, then power down the slot via sysfs:
|
# FAULTED, then power down the slot via sysfs:
|
||||||
#
|
#
|
||||||
# /sys/class/enclosure/<enclosure>/<slot>/power_status
|
# /sys/class/enclosure/<enclosure>/<slot>/power_status
|
||||||
@ -19,7 +19,7 @@
|
|||||||
# Exit codes:
|
# Exit codes:
|
||||||
# 0: slot successfully powered off
|
# 0: slot successfully powered off
|
||||||
# 1: enclosure not available
|
# 1: enclosure not available
|
||||||
# 2: ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT disabled
|
# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT disabled
|
||||||
# 3: vdev was not FAULTED
|
# 3: vdev was not FAULTED
|
||||||
# 4: The enclosure sysfs path passed from ZFS does not exist
|
# 4: The enclosure sysfs path passed from ZFS does not exist
|
||||||
# 5: Enclosure slot didn't actually turn off after we told it to
|
# 5: Enclosure slot didn't actually turn off after we told it to
|
||||||
@ -32,7 +32,7 @@ if [ ! -d /sys/class/enclosure ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT}" != "1" ] ; then
|
if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT}" != "1" ] ; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -146,4 +146,4 @@ ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
|
|||||||
# Power off the drive's slot in the enclosure if it becomes FAULTED. This can
|
# Power off the drive's slot in the enclosure if it becomes FAULTED. This can
|
||||||
# help silence misbehaving drives. This assumes your drive enclosure fully
|
# help silence misbehaving drives. This assumes your drive enclosure fully
|
||||||
# supports slot power control via sysfs.
|
# supports slot power control via sysfs.
|
||||||
#ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1
|
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
|
||||||
|
Loading…
Reference in New Issue
Block a user