How to initiate a rescan of the scsi bus und linux?

How to initiate a rescan of the scsi bus und linux?

Post by Kai Klesat » Fri, 19 Nov 2004 18:12:34


Hi there,

is it possible to rescan the scsi bus on linux and to get devices which
were not connected before boot. I need a scsi command or a c funktion
or an ioctl or something like this!

Greez, Kai
 
 
 

How to initiate a rescan of the scsi bus und linux?

Post by Rob Tur » Fri, 19 Nov 2004 20:05:53


Hello Kai,

Take a look at the rescan-scsi-bus.sh script on the following page:
http://www.yqcomputer.com/

BTW, I sent you private e-mail a while ago about SCSI pass-through
libraries, did it arrive at all?

Rob

 
 
 

How to initiate a rescan of the scsi bus und linux?

Post by Kai Klesat » Sat, 20 Nov 2004 01:29:27

THX, I found this already. Seems to be not that easy to do this under
linux. What do you think about the scsidev tool? I tried to understand
the code, but yet I don't.

Kai
 
 
 

How to initiate a rescan of the scsi bus und linux?

Post by Dave Carri » Sun, 21 Nov 2004 03:22:21


I suspect the scsiadd source at http://www.yqcomputer.com/
in the right direction.
--
Dave Carrigan
Seattle, WA, USA
XXXX@XXXXX.COM | http://www.yqcomputer.com/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to Aztec Camera - Head Is Happy (Heart's Insane)
(Knife)
 
 
 

How to initiate a rescan of the scsi bus und linux?

Post by John Murta » Thu, 25 Nov 2004 02:58:45

"Kai Klesatschke" < XXXX@XXXXX.COM > writes:



We had a server with HOT swap drives but no PERC controller,
so we had the following notes on how to remove/add a scsi drive. This
may give you some ideas.


################### TO REMOVE DRIVE

echo "scsi remove-single-device 0 1 2 3" > /proc/scsi/scsi
(replace "0 1 2 3" with your "Host Channel Id Lun")

-- for us:
(SU-recover1)/var/log>cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: FUJITSU Model: MAS3184NC Rev: 5B08
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 03 Lun: 00
Vendor: SEAGATE Model: ST336753LC Rev: 0006
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 05 Lun: 00
Vendor: SEAGATE Model: ST336753LC Rev: 0006
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: PE/PV Model: 1x6 SCSI BP Rev: 1.1
Type: Processor ANSI SCSI revision: 02


--- want to remove the first seagate, after disabling in slot

echo "scsi remove-single-device 0 0 3 0" > /proc/scsi/scsi

############## TO RESTART
After you replace the drive and restart it

echo "scsi add-single-device 0 1 2 3" > /proc/scsi/scsi

--
John
___________________________________________________________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://www.yqcomputer.com/