Page MenuHomeFreeBSD

mfiutil(8)/mrsasutil(8): display/parse enclosure by device ID (EID)
Needs ReviewPublic

Authored by michaelo on Sun, Sep 13, 8:08 PM.

Details

Reviewers
imp
ziaee
Summary

mfi_drive_name() built the "Exx:Syy" drive location string using
struct mfi_pd_info's encl_index field, the enclosure's firmware-
internal position index. Broadcom's own storcli/MegaCli tooling
instead leads with the enclosure's Device ID (EID) in its primary
drive listing; encl_index only shows up as "Position" in a detailed
per-enclosure view. Both numbers are raw, unmodified firmware values
already fetched into struct mfi_pd_info/mfi_pd_address, but only
encl_index was ever displayed or accepted as input, leading to
confusion when cross-referencing drive locations against storcli
output.

Switch mfi_drive_name() and mfi_lookup_drive() to use encl_device_id
instead, aligning FreeBSD's enclosure numbering with Broadcom's own
utilities. Since mrsasutil(8) is the same binary as mfiutil(8) under
a different name, this applies to both mfi(4) and mrsas(4) alike.

This is a user-visible behavior change: the numeric value of "xx" in
"Exx:Syy" now differs from before for any enclosure whose EID and
position index don't match, affecting anyone scripting against the
previous numbering.

PR: 294353
Relnotes: yes

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76861
Build 73744: arc lint + arc unit

Event Timeline

michaelo created this revision.

See also my testing results in the bugzilla issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294353#c2

I am not certain whether it can be backported for logical reasons also the manpage never mentions how enclosure is actually addressed.