HomeFreeBSD

zed: misc vdev_enc_sysfs_path fixes

Description

zed: misc vdev_enc_sysfs_path fixes

There have been rare cases where the VDEV_ENC_SYSFS_PATH value that zed
gets passed is stale. To mitigate this, dynamically check the sysfs
path at the time of zed event processing, and use the dynamic value if
possible. Note that there will be other times when we can not
dynamically detect the sysfs path (like if a disk disappears) and have
to rely on the old value for things like turning on the fault LED. That
is to say, we can't just blindly use the dynamic path in every case.

Also:

  • Add enclosure sysfs entry when running 'zpool add'
  • Fix 'slot' and 'enc' zpool.d scripts for nvme

Reviewed-by: Don Brady <dev.fs.zfs@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #15462

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Nov 7 2023, 5:09 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 13 2024, 10:22 PM
Parents
rG11574a7934a5: Add zfs_prepare_disk script for disk firmware install
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGdffe59c41519: zed: misc vdev_enc_sysfs_path fixes (authored by Tony Hutter <hutter2@llnl.gov>).Feb 13 2024, 10:22 PM