Re: SCSI disk naming

david parsons (o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s)
10 Jul 1997 23:55:30 -0700

In article <>,
Frohwalt Egerer <> wrote:
> (Patrick St. Jean) writes:
>[ SCSI 'first come first served' numbering ]
>> if it would be easily changable, and a couple of aspirins later am
>> writing this. It seems to me that it would be a Good Thing to have
>> something like /dev/sd0a (scsi disk, id 0, first partition). Then if a
>> disk gets removed for whatever reason, there are no worries.
>This topic has been beaten to death here:
> - The kernel dev_t currently is too small to allow for this scheme.

Unless you do tricks with it.

The max major number is 128, and the allocated numbers (as of 2.0.28)
don't go above 61. If you build the new majors
128+0 ! scsi disk
128+32 ! scsi tape
128+64 ! scsi cdrom
128+96 ! scsi generic

that leaves 13 bits for minor devices. Rest assured you will have
to do some jumping through hoops to deal with these properly in the
kernel, but 13 bits gives you 4 bits for ID, 3 bits for LUN, 3 bits
for partition, and 3 bits for controller; I'm sure there are some
systems out there that exceed these limits, but I suspect this won't
describe the vast majority of the Linux machines out there.

david parsons \bi/ Not waiting for godot.