Robert Nichols
2008-Jun-04 02:19 UTC
[CentOS] Finding module name for SCSI host adapter for a given SCSI target
Given a path to a SCSI device, e.g. "DEV=/dev/st1", I need to find the name of the kernel module for the SCSI host adapter that controls that target. The objective is to be able to unload and reload the kernel module when the drive gets into a state that requires a SCSI bus reset for recovery. The best I've been able to come up with so far is: SCSIMOD=$(cat /sys/class/scsi_tape/${DEV##*/}/device/../../scsi_host:host*/proc_name) Anyone know of a way that is a bit less convoluted? -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
Seemingly Similar Threads
- [PATCH] virtio-scsi: Implement change_queue_depth for virtscsi targets
- [PATCH] virtio-scsi: Implement change_queue_depth for virtscsi targets
- [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
- [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
- [PATCH 0/6] SCSI frontend and backend drivers