[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: autoloading sg driver during boot



Aleksandar Milivojevic wrote:
Paul Howarth wrote:

I have a SCSI scanner that uses the sg module; I wrote a custom udev
rule to identify the scanner when the SCSI adapter module detects it,
and that then creates the /dev/sg* entry for it. Can't you do something
like that?


I did some quick reading of udev documentation yesterday. However, I don't see how to exactly do it. A symlink for tape isn't going to work (/dev/st0 and /dev/sg1 use different set of IOCTLs, "mt -f /dev/sg1 rewind" is going to give an error for example). For the medium changer, kernel doesn't create any special device (there's no special driver for it, such as st for tapes or sd_mod for disks), the only way of accessing it is through /dev/sg0.

Unless I missed something obvious in documentation, and there is a way to tell udev "when kernel detects a device controlled by st module (char major 9), also create device nodes for sg module (char major 21)".

Aren't the tape and the autochanger using different SCSI IDs or LUNs?


Try this:
Manually load the sg module so that the sg devices get created.
What do you then get for:
$ udevinfo -a -p `udevinfo -q path -n /dev/sg0`
and
$ udevinfo -a -p `udevinfo -q path -n /dev/sg1`

Paul.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]