Subject: Re: Locking down SCSI Target #'s to disk IDs
To: Alec H. Peterson <chuckie@panix.com>
From: Chris G Demetriou <Chris_G_Demetriou@lagavulin.pdl.cs.cmu.edu>
List: current-users
Date: 07/07/1995 21:16:45
> I'm fairly sure that it is possible to lock down the target ID to a
> specific drive ID (like sd0, sd1, etc.).  However, when defining it in
> the kernel, the slave # does not appear to be the target ID.  So, what
> slave IDs would I use to correspond with targets 0,1,2, and 3?  For
> what it's worth, I'm using an NCR SCSI controller.

[ i'm assuming that you're running a recent version of NetBSD-current,
  since you posted this to current-users... ]

you don't make it clear what port you're using.  (even "NCR SCSI
controller" doesn't help too much, because i can think of at least
three different NCR controllers used in a variety of ports...)

Assuming that the port you're using uses 'new config' (i.e. is not an
hp300 or pmax), the correct syntax is something like:

sd0     at scsibus? target 0 lun 0
sd1     at scsibus? target 1 lun 0
sd2     at scsibus? target 2 lun 0
sd*     at scsibus? target ? lun ?      # SCSI disk drives
st0     at scsibus? target 6 lun 0
st*     at scsibus? target ? lun ?      # SCSI tape drives
cd0     at scsibus? target 5 lun 0
cd*     at scsibus? target ? lun ?      # SCSI CD-ROM drives


you can also hardwire the 'scsibus' numbers, by doing something like
the following (assuming "whatever" is the SCSI host adapter driver's
name 8-):

whatever0	at whateverbus? [whateverbus config info]
scsibus0	at whatever0

then

sd0	at scsibus0 target 0 lun 0

etc.


That syntax won't work on ports which use 'old config,' but i believe
an appropriate description of how to do it on them has already been
posted.



chris