Re: autoloading sg driver during boot

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

 



Paul Howarth wrote:

Right, so this one's the autochanger. Try creating /etc/udev/rules.d/10-custom.rules containing the following line:

BUS="scsi", SYSFS{vendor}="EXABYTE*", SYSFS{model}="EXB-210*", NAME="sg%e", SYMLINK="autochanger%e"

Then see if you get the right device nodes created next time the SCSI card module is loaded.

No luck. I tried it exactly the way you typed it above (although, it should be NAME="sg%n" to be consistent with default way of nameing sg devices). However, this only gets executed after sg module is loaded. If it is not loaded on boot, no device nodes are created.


So I still need to perform "modprobe sg". It's still usefull feautre however, so that my autochanger name isn't going to change if I add some more SCSI hardware in the future. I've modified it a bit so that my rules are creating only symlinks, and default rules take care of actuall sg nodes (and hopefully using type=8 is the right way to detect autochangers):

BUS="scsi", SYSFS{vendor}="EXABYTE*", SYSFS{type}="8", \
   SYSFS{model}="EXB-210*", SYMLINK="ez17changer%e"
BUS="scsi", SYSFS{type}="8", SYMLINK="autochanger%e"

So I get something like this:

lrwxrwxrwx  1 root root     3 Apr 14 10:25 autochanger -> sg0
lrwxrwxrwx  1 root root     3 Apr 14 10:25 ez17changer -> sg0
crw-rw----  1 root disk 21, 0 Apr 14 10:25 sg0
crw-rw----  1 root disk 21, 1 Apr 14 10:25 sg1

I'll stick with invoking modprobe from rc.local, since it seems to be the only way around this, and will use the udev rules to ensure "static" nameing for tape library (so that it doesn't change if I add SCSI disks and/or change SCSI IDs)...

--
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux