[illumos-Developer] Reliable way of hardware enumeration...

McBofh james.c.mcpherson at gmail.com
Thu Oct 14 21:36:13 PDT 2010


On 15/10/10 01:54 PM, Peter Tap wrote:
> Folks,
>
> I need a reliable way to enumerate hardware on Illumos. Primarily I
> need to get all the disks in the main head unit as well as additional
> enclosures, if any.
>
> I debugged fmtopo code. However, fmtopo seems to report incorrect
> information (or information that doesn't seem to make any sense).
>
> I tried ipmitool. However, this tool requires BMC driver and this
> driver cannot be redistributed with the OS.
>
> At this point, I am stuck with my coding. I would appreciate any help
> in pointing me in the right direction.


libtopo uses plugins to get the information it presents to you.
The plugins that your enclosure needs to work with are those
provided by libscsi and libses.

You can find important info on libscsi/libses restrictions by
perusing the code under $SRC/lib/scsi. Be aware, though, that
it's a bunch of twisty-windy callbacks. Takes a while to get
your head around.


Your enclosure needs to support SES diagnostic pagecode 0xa, Additional
Element Status and set the Element Index Present (EIP) bit to 1 in the
pagecode response.

Enclosures which do not support this pagecode, or which do not have the
Element Index Present (EIP) bit set to 1 in the pagecode response are
not enumerable with libses. You'll see a comment to this effect under
$SRC/lib/scsi.

Alternatively, FWARC/2010/185 (http://arc.opensolaris.org/caselog/FWARC/2010/185/)
might be useful to you.


cheers,
McB



More information about the Developer mailing list