>From [EMAIL PROTECTED] Thu Feb 11 16:43:38 1999
>From: Michael Schwingen <[EMAIL PROTECTED]>
>On Wed, Feb 10, 1999 at 09:36:45PM +0100, Joerg Schilling wrote:
>> But the mapping from bus/target/lun should not be done inside the kernel.
>> The kernel cannot help you:
>>
>> Let's assume I have 8 CD-recorders on 4 SCSI busses each two sharing
>> a fast cache disk and I put them somehow into 2 boxes (4 into each).
>>
>> Now you are right, the drives don't send you a serial number
>> and for this reason, the kernel cannot help you.
>>
>> But you most likely will but labels on the drives.
>>
>> Well cdrecord gives you the possibility to mapo the device name exactly to the
>> name you put on the labels.
>>
>> cdrecord dev=burner_1
>Nice. However, this should not be done in every single application.
You could use a different name for the mapping file and make all applications
use this file. I may thing about putting it into a later version of the
SCSI transport lib. In this case, only the SCSI name mapping should be in this
file.
>Locally, we use a system called scsiscan[1], which creates aliases in
>/dev/scsi/ - in you example, I would set up the scsiscan configuration so
>that /dev/scsi/burner_1 is automatically created as a device node with the
>correct major/minor/type for the device, whetever ID I switch it to. When
>using disks or other devices that can be identified 100% (using contents of
>sector 0, plus device/vendor name), this works 100% automatic. On identical
>devices which can not be told apart, you still have to specify the IDs (like
>in the cdrecord config file).
This will not work! Most SCSI transport implementations (specially the CAM
standard) don't have different device nodes to access different devices.
>However, this needs to be done only once - in my case, scsiscan is a simple
>user mode program that is run on every reboot (or by hand, to add/remove
>devices), but I don't care if this is done in the kernel or in user space -
>however, it should *not* be done in every single application, but in one
>central place.
>I think it should be possible to call a program which does SCSI calls by
>specifying a kernel device - eg. /dev/scd0, or a link (/dev/cdrom). In that
>case, the user does not have to worry about IDs at all in a typical system.
>If no special device (eg. cdrom) exists, a generic one can be used. IMHO,
>the user should only be concerned with IDs when caling a program if it is
>absolutely unavoidable.
However, you are free to write a shell/awk script to create he right entries
for the file /etc/default/cdrecord This will be portable at least on
any OS that supports SCSI bus scanning.
J�rg
EMail:[EMAIL PROTECTED] (home) J�rg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni) If you don't have iso-8859-1
[EMAIL PROTECTED] (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]