Page MenuHomeFreeBSD

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

Authored by michaelo on Sun, Sep 13, 8:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 15, 10:14 AM
Unknown Object (File)
Tue, Sep 15, 3:59 AM
Unknown Object (File)
Mon, Sep 14, 4:50 AM
Unknown Object (File)
Mon, Sep 14, 4:49 AM
Unknown Object (File)
Sun, Sep 13, 10:40 PM
Subscribers
None

Details

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.

This revision is now accepted and ready to land.Sun, Sep 13, 9:41 PM

Thank you @imp , what is your opinion on MFC? The manpage does not specify what 'enclosure' actually is.