home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!usc!howland.reston.ans.net!bogus.sura.net!ra!tantalus.nrl.navy.mil!eric
- From: eric@tantalus.nrl.navy.mil (Eric Youngdale)
- Subject: Re: SCSI Autodetect? Static table? (Was:
- Message-ID: <C17oy4.Bry@ra.nrl.navy.mil>
- Sender: usenet@ra.nrl.navy.mil
- Organization: Naval Research Laboratory
- References: <1029319.54676.2177@kcbbs.gen.nz>
- Date: Thu, 21 Jan 1993 16:10:51 GMT
- Lines: 42
-
- In article <1029319.54676.2177@kcbbs.gen.nz> Craig_Anderson@kcbbs.gen.nz (Craig Anderson) writes:
- >In article <1993Jan16.084315.7385@colorado.edu> drew@juliet.cs.colorado.edu (D
- >>Unfortunately, Linux uses a 16 bit dev_t, with only 8 bits reserved
- >>for the minor number, which only lets us have 256 minor numbers.
- >
- >16 bits is enough. It's bad software engineering to encode attributes
- >into the minor number (other than some abstract concept of disk 1,
- >disk 2, disk 3).
- >
- >For a better (tho still quick and dirty) method, how about having a
- >table in the kernel (mapping the scsi id, lun, partition, and N bytes
- >of device specific stuff to a major/minor number - obviously the generic
- >implementation is M+N bytes of device specific stuff with M bytes defined
- >for the scsi driver). Then a simple program could be used to patch
- >this table (on disk and/or in mem) in the kernel. No kernel rebuilds
- >required, allows an arbitrary amount of information to be associated with
- >each device, is simple to implement and no less efficient at runtime.
-
- Well, such a table effectively already exists, but it is built up
- automatically at boot time, so it never exists on disk. I am opposed to the
- idea of modifying the table in memory because you could easily corrupt a disk
- if you started switching around disk ID numbers on the fly.
-
- I am sympathetic to those who are concerned about device renumbering if
- they take a disk out of the system. How about if we (they) add some symlink
- like /dev/scdisk-a0 /dev/scdisk-b1, etc, and have these point at the correct
- disks and/or partitions. If you remove a disk from the system, you can simply
- modify the symlinks to point to the new names for the partitions. Heck, these
- could even be automatically generated at boot time in rc.local, so that you do
- not have to worry about changing these whenever you add/remove a disk.
-
- I could add an ioctl that would return the ID and lun for a given scsi
- device in order to make it easier to automate the procedure. How do people
- feel about this approach?
-
- -Eric
-
- --
- A host is a host from coast to coast.....eric@tantalus.nrl.navy.mil
- & no one will talk to a host that's close..........................
- Unless the host (that isn't close).................................
- is busy, hung or dead................................Eric Youngdale
-