HomeFreeBSD

Clear enclosure sysfs path from VDEV label when sysfs path isn't present

Description

Clear enclosure sysfs path from VDEV label when sysfs path isn't present

This clears vdev_enc_sysfs_path from the label if the VDEV's
/sys/class/block/<dev>/device/enclosure_device path isn't present.

This is important in the case where a disk that is labeled with
vdev_enc_sysfs_path is pulled out and put into another enclosure.
In that case, it's possible that the old sysfs path would be used to
turn on the fault LED for the disk's old slot postion, assuming the
new slot didn't have a LED sysfs entry.

Reviewed-by: Don Brady <don.brady@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #5524
Closes #5773

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Feb 10 2017, 11:18 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 10 2017, 11:18 PM
Parents
rG449705dbef30: OpenZFS 5704 - libzfs can only handle 255 file descriptors
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG65a736bc0df1: Clear enclosure sysfs path from VDEV label when sysfs path isn't present (authored by Tony Hutter <hutter2@llnl.gov>).Feb 10 2017, 11:18 PM