Subject: NetBSD 2.x SCSI subsystem
To: None <netbsd-users@netbsd.org>
From: Chris Ross <cross+netbsd@distal.com>
List: netbsd-users
Date: 01/28/2005 15:24:35
   Hi there.  I have a couple questions about the SCSI subsystem.
In my case, I'm on a i386 NetBSD 2.0.1 box, using esiop (and
siop) controllers.

   1) The external hardware RAID device that is on it has
3 LUNs.  LUN0, 1, and 3.  Only LUNs 0 and 1 showed up at
autoconf/boot time.  Does NetBSD scan for luns in order,
and stop looking when it finds a non-existent lun?  This
wasn't true on the previous BSD (BSD/OS 4.x) I was running
against this RAID array.

   2) The machine has managed to eat itself, not perhaps
entirely due to NetBSD.  But, I was porting some array
control software for this RAID unit, and one of the things
it does is scan for devices.  Right now, because it's a port
of a somewhat juvenile interface, it grok's though dmesg.boot
to find the information about SCSI devices.
   Is there a way to ask the SCSI subsystem what devices there
are?  In this case, I want all SCSI devices, on all controllers.
I'd need to know what controller they use, and the target, LUN
information for each disk device.  I only care about disk devices,
but I imagine the query would be for any SCSI device.)  Can
I inquire of the scsibus driver, or something like that?

   Thanks.  All info and help appreciated.

                            - Chris