Subject: Re: Dynamic SCSI ids (was: A possible way of handling...)
To: None <briggs@puma.macbsd.com, thorpej@nas.nasa.gov>
From: Johan Danielsson <joda@pdc.kth.se>
List: tech-kern
Date: 03/30/1997 06:45:46
--Multipart_Sun_Mar_30_06:45:46_1997-1
Content-Type: text/plain; charset=US-ASCII

Allen Briggs <briggs@puma.macbsd.com> writes:

> Would you care to propose a method for NetBSD that would fit your
> needs?

I agree that what you really want is symbolic disk names. I also
realize that the BSD way of handling scsi ids work quite well in many
cases. It does however have the potential of screwing up disks.
Consider the following setup:

SCSI 0: system disk
SCSI 1: some other ffs disk
SCSI 2: data disk that isn't ffs (or even worse, might be `close' to
ffs like an AFS vice partition)

SCSI 1 goes kaput, which causes a panic. The system reboots and then
magically SCSI 2 will be sd1, and fsck has a nice opportunity to mess
things up bad.

If I don't remember wrong, this did happen with some version of 4.3
which had static geometry information, `gee, this is sd1, and I know
it's *this* big', so you always had an extra lost disk, if you weren't
quick enough.

Jason Thorpe <thorpej@nas.nasa.gov> writes:

> Have you ever compiled a Digital UNIX (formerly DEC OSF/1) kernel?
> There are, quite literally, screenfulls of SCSI disk and tape
> configuration info in their GENERIC configuration.  It's ridiculous.

This used to be a pain, and that's why I don't fancy that
approach. It's not any more though. What follows is an abreviated
GENERIC config file. You won't find any disks in there, just busses.

This will still fail if you add or remove whole busses, but this
probably happens less often.

/Johan



--Multipart_Sun_Mar_30_06:45:46_1997-1
Content-Type: text/plain; charset=US-ASCII

[...]
# Alpha config file
[...]
ident		GENERIC
[...]
# TCDS 'busses'
bus		tcds0	at *		vector tcdsintr
bus		tcds1	at *		vector tcdsintr
[...]
# ASC 'busses'
bus		asc0	at *		vector ascintr
bus		asc1	at *		vector ascintr
[...]
# KZTSA 'busses'
bus		tza0	at *		vector tzaintr
bus		tza1	at *		vector tzaintr
[...]
# AHA1740/2 EISA SCSI 'busses'
bus		aha0    at eisa?	vector ahaintr
bus		aha1    at eisa?	vector ahaintr
[...]
# NCR'810 EISA SCSI 'busses'
bus		psiop0	at pci?		vector psiopintr
bus		psiop1	at pci?		vector psiopintr
[...]
# PZA 'busses'
bus		pza0	at pci?		vector pzaintr
bus		pza1	at pci?		vector pzaintr
[...]
# QLOGIC ISP1020 SCSI 'busses'
bus             isp0    at pci?         vector ispintr
bus             isp1    at pci?         vector ispintr
[...]
# All controllers
controller	scsi0	at *   vector scsiintr
controller	scsi1	at *   vector scsiintr
controller	scsi2	at *   vector scsiintr
controller	scsi3	at *   vector scsiintr
controller	scsi4	at *   vector scsiintr
controller	scsi5	at *   vector scsiintr
controller	scsi6	at *   vector scsiintr
[...]

--Multipart_Sun_Mar_30_06:45:46_1997-1--