FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-04-2008, 02:19 AM
Robert Nichols
 
Default 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.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org