scsi.agent trouble: load more than module per TYPE
I had necessity to load two modules for TYPEÍrom (in this case, sr_mod and sg), but the original script can't do that. I found a Ubuntu patch for that: it corrects this behaviour. My question: why don't You merging Ubuntu patch (or only the workaround in discussion) in official hotplug?
http://archive.ubuntu.com/ubuntu/pool/main/h/hotplug/hotplug_0.0.20040329-22ubuntu13.diff.gz
Thank's.
Signature · 19 lines
« Invento ergo sum » [G]reedy[F]ly aka Shuren @ irc.azzurra.org Powered by Slackware Linux Linux User #283140 GPG: http://xoomer.virgilio.it/greedyfly/directory/michele.asc ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd_______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Michele Barbiero
I had necessity to load two modules for TYPE=cdrom (in this case,
sr_modand sg), but the original script can't do that. I found a Ubuntu patch for that: it corrects this behaviour. My question: why don't You merging Ubuntu patch (or only the workaround in discussion) in official hotplug?
Because the "official hotplug" package is dead and not actively maintained anymore and sane distributions switched to udev.
Signature · 2 lines
ciao, Marco
On Wed, 18 Jan 2006 20:16:21 +0100
[email protected] (Marco d'Itri) wrote:
[Cut]
Quoted 2 lines
Because the "official hotplug" package is dead and not actively maintained anymore and sane distributions switched to udev.
It's a modules problem (hotplug), not device one (udev).
Signature · 19 lines
« Invento ergo sum » [G]reedy[F]ly aka Shuren @ irc.azzurra.org Powered by Slackware Linux Linux User #283140 GPG: http://xoomer.virgilio.it/greedyfly/directory/michele.asc ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd_______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Michele Barbiero
Quoted 2 lines
Because the "official hotplug" package is dead and not actively maintained anymore and sane distributions switched to udev.
It's a modules problem (hotplug), not device one (udev).
It's not.
Signature · 2 lines
ciao, Marco
Quoted 8 lines · Michele Barbiero
On Wed, 18 Jan 2006 20:16:21 +0100
[email protected] (Marco d'Itri) wrote:[Cut]
Quoted 2 lines
Because the "official hotplug" package is dead and not actively maintained anymore and sane distributions switched to udev.
It's a modules problem (hotplug), not device one (udev).
It is a module problem solved via udev rules.
IMHO, sg should still be loaded for all scsi devices, especially for ones that have an odd (such as enclousre or raid) or unknown type. Looks like only SUSE does it this way.
[Yeh ... you can use sr/st/sd for SG_IO.]
[kernel udev]$ grep "sg" etc/udev/*/* | grep modprobe etc/udev/debian/hotplug.rules:SUBSYSTEM="scsi_device", SYSFS{type}="[235689]", RUN+="/sbin/modprobe sg"
etc/udev/redhat/udev.rules: RUN+="/sbin/modprobe sg"
etc/udev/suse/50-udev-default.rules:SUBSYSTEM="scsi_device", ACTION="add", RUN+="/sbin/modprobe sg"
The redhat line is only for SYSFS{type}="[23689]".
Types (per scsi.h) are:
#define TYPE_DISK 0x00 #define TYPE_TAPE 0x01 #define TYPE_PRINTER 0x02 #define TYPE_PROCESSOR 0x03 /* HP scanners use this */ #define TYPE_WORM 0x04 /* Treated as ROM by our system */ #define TYPE_ROM 0x05 #define TYPE_SCANNER 0x06 #define TYPE_MOD 0x07 /* Magneto-optical disk */ #define TYPE_MEDIUM_CHANGER 0x08 #define TYPE_COMM 0x09 /* Communications device */ #define TYPE_RAID 0x0c #define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ #define TYPE_RBC 0x0e
-- Patrick Mansfield
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Patrick Mansfield
IMHO, sg should still be loaded for all scsi devices, especially for ones that have an odd (such as enclousre or raid) or unknown type. Looks like only SUSE does it this way.
Nobody ever opened a bug suggesting to do it differently, so I did not bother changing the rules used by Debian.
Signature · 2 lines
ciao, Marco
Quoted 7 lines · Marco d'Itri
Quoted 3 lines · Patrick Mansfield
IMHO, sg should still be loaded for all scsi devices, especially for ones that have an odd (such as enclousre or raid) or unknown type. Looks like only SUSE does it this way.
Nobody ever opened a bug suggesting to do it differently, so I did not bother changing the rules used by Debian.
If you don't want to always load sg, at least load sg if no other driver is loaded for the scsi device. That might even be better than always loading it (sort of force SG_IO users to use /dev/sd ...).
I don't know why sr_mod is loaded for type 3 (processor), unless you have patched sr.c sr_probe(), sr only attaches to 5 (TYPE_ROM) and 4 (TYPE_WORM).
So use (for debian at least, not tested at all):
SUBSYSTEM="scsi_device", SYSFS{type}!="[0|1|4|5|7|14]", RUN+="/sbin/modprobe sg"
-- Patrick Mansfield
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · Patrick Mansfield
Quoted 7 lines · Marco d'Itri
Quoted 3 lines · Patrick Mansfield
IMHO, sg should still be loaded for all scsi devices, especially for ones that have an odd (such as enclousre or raid) or unknown type. Looks like only SUSE does it this way.
Nobody ever opened a bug suggesting to do it differently, so I did not bother changing the rules used by Debian.
If you don't want to always load sg, at least load sg if no other driver is loaded for the scsi device.
I guess it makes sense. We need handle to speak with SCSI device and sg looks like the right one in this case.
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDzw5fR6LMutpd94wRAtR/AJ0aT8LZy7pzlU5pSWcaGJLjXst0JACfeFaV d0YuQeg57ntXd5n4vzL1wsA=4hqD
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel