Re: SCSI device numbering (was: Re: Ideas for v2.1

Carsten Paeth (
Mon, 1 Jul 1996 15:35:22 +0200 (MET DST)

> So use the major number as a controller index (that's really what the major
> number is supposed to be, anyway), and the minor number as the disk index.
> There must be some way to pack SCSI disk info into 20 bits (8+8+4?).
> Note that this has one more added advantage: it's easy to keep the old SCSI
> major number with the dynamic minors alive. The low-level controllers won't
> need to know, because this translation could be transparently handled by some
> higher-level translation code: the old major numbers get translated to the
> 32-bit device numbers and this can all be transparent to the user (so that
> old setups continue to work despite the changes to disk numbering).
> Note that having one major number per controller has lots of other
> advantages: it means that controllers don't have to know about each other,
> because they have complete control over their own major (unlike now, where
> all controllers have the same major, and one of the things the SCSI layer has
> to do is to separate out all the disk requests to different controllers and
> drivers).
> I don't see any problems with this approach, anybody else?

I like this approach.
But also we should have something to make the hot swap easier.
I think about a /dev/root. In startup scripts it is than easy to fsck
the root filesystem, remount it read-write an that perhaps check it a
different controller is present, and call some scripts to change fstab
or entries in /dev before continue.

> Linus