Messages in this thread | | | Date | Wed, 7 May 1997 09:57:03 -0700 | From | David Hinds <> | Subject | Re: SCSI disk devices: even crazier naming scheme |
| |
Andras Kadinger <bandit@freeside.elte.hu> wrote: > > To exercise this to an extreme level, Eric (or some brave soul) could > enhance scsidev to provide rather longish and practically untypable > names providing all (by some definition of all) available > identification data of a scsi entity, and then everybody could make up > simple scripts (which we have to do anyway in order to customize our > systems) to use the magic of filename expansion to enumerate, retrieve > and sort all the devices to their heart's content.
...
> I read somewhere that one big advantage of unices is the extensive > recycling of ideas and concepts.
Don't you know it!
For the PCMCIA driver collection, I had the need for something like scsidev, but didn't know that it existed at that time. So I wrote something somewhat similar, but also along the lines of what you have in mind. My "scsi_info" command produces information like:
# scsi_info /dev/sda1 SCSI_ID="0,4,0" MODEL="Syquest EZ135S" FW_REV="1_12"
I also have a similar tool for IDE drives:
# ide_info /dev/hda MODEL="TOSHIBA MK1824FCV" FW_REV="P0.09 B" SERIAL_NO="Z4J60510"
Then, the scripts for configuring SCSI devices do things like:
eval `scsi_info /dev/$DEVICE` ADDRESS="$SCHEME,$TYPE,$SOCKET,$SCSI_ID"
case $ADDRESS in *,sr,*,*,*,*) # stuff for CD-ROM's *,*,*,0,4,0) # stuff for my Syquest drive ;; esac
-- Dave Hinds dhinds@hyper.stanford.edu
| |