lkml.org 
[lkml]   [1996]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectSCSI device numbering (was: Re: Ideas for v2.1
Date
From
Eric Youngdale (eric@aib.com) wrote:
: [Someone else wrote]
: >I have
: >
: >/dev/hda -> IDE
: >/dev/sda -> SCSI ID0
: >/dev/sdb -> SCSI ID3
: >/dev/sdc -> SCSI ID4
: >/dev/sdd -> SCSI ID5
: >
: >Now I remove SCSI ID3. 'drive does not spin underwater error'
: >
: >/dev/sda -> SCSI ID0
: >/dev/sdb -> SCSI ID4
: >/dev/sdc -> SCSI ID5
: >
: >:-(
: >
: >Not too different from the scheme you criticized above. But it is
: >already in there. And IMHO it sucks. :-(
:
: Sigh. This is why I wrote scsidev. Take a look on tsx-11 in
: pub/linux/ALPHA/scsi. People may argue as to whether this is the correct
: approach, but it solves the problem you describe.
:
: [scsidev updates /dev/scsi/* at boot time]
:
: [We need 32 bit or 64 bit dev_t to do it right]

I've seen this said a lot of times before, but there's a simple solution
that would solve the problem for 99% of users and has virtually no
backwards-compatibility problems:

scsi ID lun minor number
0 0 0 0
0 1 0 1
0 2 0 2
0 3 0 3
0 4 0 4
0 5 0 5
0 6 0 6
0 7 0 7
1 0 0 8
1 1 0 9
1 2 0 10
1 3 0 11
1 4 0 12
1 5 0 13
1 6 0 14
1 7 0 15

All other devices on the SCSI busses are numbered with the present
method, starting with minor number 16.

This means that for the vast majority of users, namely those
with 1 or two narrow-SCSI cards who don't use LUNs (or who have
only one device that uses LUNs), the minor numbers would always be
stable. It also means that if you rescan the SCSI bus after boot
time, the devices will pop up with the expected minor numbers,
and thus with the expected /dev/ entries. It also means you don't
lose the ability to support lots of funny lun/scsi card/wide etc.
combinations.

--
We believe that God is on our side -- Netscape chief executive James Barksdale
--
Erik Corry ehcorry@inet.uni-c.dk http://inet.uni-c.dk/~ehcorry/ +45 86166287


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.226 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site