Subject: Re: Drive Numbering...
To: Frank Dana <email@example.com>
From: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
Date: 11/15/1995 03:27:33
> Could we puh-leeeeze get the device numbering set up so that it at least
> sorta reflects physical ID numbers? Or, at the very least, doesn't change
> if you add/remove anywhere but the end of the ID chain?
> Something to chat about for 1.2. 8)
No, something for you to fix in your config files. This was one of
the first annoyances fixed in NetBSD's SCSI code, before any port
other than the i386 port even existed.
An example config file that wires specific devices to specific ids is
the i386 'SUN_LAMP' config. the set of lines that does it is:
ahb0 at isa? port ? irq ? # Adaptec 174 SCSI controllers
scsibus* at ahb?
bt0 at isa? port 0x130 irq ? drq ? # BusLogic 4X SCSI controllers
scsibus* at bt?
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
look for an ahb and a bt SCSI adapter. assign them the first
'scsibus' unit available. then:
(1) the first disk at ID 0 the kernel finds, assign to sd0,
(2) the first disk at ID 1 the kernel finds, assign to sd1,
(3) the first disk at ID 2 the kernel finds, assign to sd2,
(4) any other disks the kernel finds, assign to consecutive
I picked this setup, because i have two SCSI cards in the machine, and
for a while, i was swapping devices between the two busses they
provided (without changing the IDs).
You could trivially make the configuration more specific, by
specifying any or all of the 'scsibus' numbers.
I strongly encourage people to specify devices in their custom config
files as well as they can. In the generic kernels, it makes quite a
bit of sense to be as non-specific as possbile.