HomeFreeBSD

vdev_id: Fix enclosure_symlinks feature

Description

vdev_id: Fix enclosure_symlinks feature

The vdev_id.conf "enclosure_symlinks" option persistently creates
and maps /dev/by-enclosure symlinks to dynamic /dev/sg* devices.

This patch fixes two issues:

  1. The enclosure_symlinks feature was accidentally broken in:

    vdev_id: Support daisy-chained JBODs in multipath mode
  1. Even when working, the feature numbered the enclosure sequentially rather than by HBA port number. That meant that if a port was down or didn't appear in sysfs, then the enclosure_sumlinks numbers would be numbered wrong.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #12660

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Oct 20 2021, 10:48 PM
Parents
rG586b5d366edf: Rescan enclosure sysfs path on import
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGd11b03ed81a0: vdev_id: Fix enclosure_symlinks feature (authored by Tony Hutter <hutter2@llnl.gov>).Nov 2 2021, 11:31 PM