scsiinfo driver
Last month there were some discussions on this list about hotplugging (and unplugging) SCSI devices. That was mainly in the context of various pseudo drivers such as sbp2_1394, usb/mass_storage and usb/microtek.
As was pointed out at the time, various changes would probably be required to the SCSI subsystem. As an incremental approach to the problem an experimental upper level driver is available for lk 2.4.2:
http://www.torque.net/scsi/scsiinfo.html
Essentially this driver monitors device attaches and detaches. If CONFIG_HOTPLUG has been set then the /sbin/hotplug mechanism is invoked. In any case lists of attached and detached devices plus a host list are available via ioctls.
At this stage there is very little documentation. Look at the ioctl test program (si_test.c), the header file (include/scsi/scsiinfo.h) and the si_call_policy() function in the driver to see the names of the provided environment variables.
I look forward to suggestions :-)
Doug Gilbert
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Looks like a promising direction, especially if (as you'd suggested offline) very similar models can work for IDE.
What would the job of /etc/hotplug/scsi.agent be? I'm not quite clear -- modprobe "sd" or "sg"? Mount partitions in the appropriate filesystem locations?
(I said "script", but of course that's optional; some logic to figure out a right mount point might want to call into compiled libraries.)
- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · David Brownell
Looks like a promising direction, especially if (as you'd suggested offline) very similar models can work for IDE.
What would the job of
/etc/hotplug/scsi.agentbe? I'm not quite clear -- modprobe "sd" or "sg"? Mount partitions in the appropriate filesystem locations?
- modprobe whatever scsi modules are appropriate
- create appropriate mount points & entries in /etc/fstab
- signal whatever thing is creating desktop icons to add new ones (if it's not watching /etc/fstab)
We've got something here that we're using to do the second of these; it is currently getting called on pcmcia/usb events for storage things, but it runs into the problem that requires this SCSI event system (race between device creation, userland notification, and partition table reading...)
Bill
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 14 lines · Bill Nottingham
Quoted 6 lines · David Brownell
Looks like a promising direction, especially if (as you'd suggested offline) very similar models can work for IDE.
What would the job of
/etc/hotplug/scsi.agentbe? I'm not quite clear -- modprobe "sd" or "sg"? Mount partitions in the appropriate filesystem locations?- modprobe whatever scsi modules are appropriate
- create appropriate mount points & entries in/etc/fstab
- signal whatever thing is creating desktop icons to add new ones (if it's not watching/etc/fstab)
Quoted 5 lines
We've got something here that we're using to do the second of these; it is currently getting called on pcmcia/usb events for storage things, but it runs into the problem that requires this SCSI event system (race between device creation, userland notification, and partition table reading...)
I have added a simple scsi.agent script that modprobes the various scsi upper level drivers (e.g. sr and st) based on the scsi type of the newly added device. See:
http://www.torque.net/scsi/scsiinfo.html
Can anyone think of a better name than "scsiinfo" as H. Peter Anvin doesn't like it?
Doug Gilbert
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel