mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Enclosure LED fixes
- Pass $VDEV_ENC_SYSFS_PATH to 'zpool [iostat|status] -c' to include enclosure LED sysfs path. - Set LEDs correctly after import. This includes clearing any erroniously set LEDs prior to the import, and setting the LED for any UNAVAIL drives. - Include symlink for vdev_attach-led.sh in Makefile.am. - Print the VDEV path in all-syslog.sh, and fix it so the pool GUID actually prints. Reviewed-by: Don Brady <don.brady@intel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #5716 Closes #5751
This commit is contained in:
committed by
Brian Behlendorf
parent
65a736bc0d
commit
b291029e86
@@ -413,3 +413,25 @@ zed_rate_limit()
|
||||
zed_unlock "${lockfile}" "${lockfile_fd}"
|
||||
return "${rv}"
|
||||
}
|
||||
|
||||
|
||||
# zed_guid_to_pool (guid)
|
||||
#
|
||||
# Convert a pool GUID into its pool name (like "tank")
|
||||
# Arguments
|
||||
# guid: pool GUID (decimal or hex)
|
||||
#
|
||||
# Return
|
||||
# Pool name
|
||||
#
|
||||
function zed_guid_to_pool
|
||||
{
|
||||
if [ -z "$1" ] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
guid=$(printf "%llu" $1)
|
||||
if [ ! -z "$guid" ] ; then
|
||||
$ZPOOL get -H -ovalue,name guid | awk '$1=='$guid' {print $2}'
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user