How to initiate a rescan of the scsi bus und linux?
PC Hardware Forum Index PC Hardware
Dicussion of PC hardware and peripherals
 
 FAQFAQ   MemberlistMemberlist    RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web hwtalk.net
How to initiate a rescan of the scsi bus und linux?

 
Post new topic   Reply to topic    PC Hardware Forum Index -> SCSI
Author Message
Kai Klesatschke
Guest





Posted: Thu Nov 18, 2004 2:12 pm    Post subject: How to initiate a rescan of the scsi bus und linux? Reply with quote

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
Back to top
Rob Turk
Guest





Posted: Thu Nov 18, 2004 4:05 pm    Post subject: Re: How to initiate a rescan of the scsi bus und linux? Reply with quote

"Kai Klesatschke" <kai.klesatschke@gmx.de> wrote in message
news:1100769154.579605.56410@f14g2000cwb.googlegroups.com...
Quote:
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


Hello Kai,

Take a look at the rescan-scsi-bus.sh script on the following page:
http://www.garloff.de/kurt/linux/scsidev/

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

Rob
Back to top
Kai Klesatschke
Guest





Posted: Thu Nov 18, 2004 9:29 pm    Post subject: Re: How to initiate a rescan of the scsi bus und linux? Reply with quote

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
Back to top
Dave Carrigan
Guest





Posted: Fri Nov 19, 2004 11:22 pm    Post subject: Re: How to initiate a rescan of the scsi bus und linux? Reply with quote

Kai Klesatschke wrote:

Quote:
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!

I suspect the scsiadd source at http://llg.cubic.org/tools/ would point you
in the right direction.
--
Dave Carrigan
Seattle, WA, USA
dave@rudedog.org | http://www.rudedog.org/ | 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)
Back to top
John Murtari
Guest





Posted: Tue Nov 23, 2004 10:58 pm    Post subject: Re: How to initiate a rescan of the scsi bus und linux? Reply with quote

"Kai Klesatschke" <kai.klesatschke@gmx.de> writes:

Quote:
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



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://thebook.com/
Back to top
 
Post new topic   Reply to topic    PC Hardware Forum Index -> SCSI All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Electronics VoIP DSP
New Topics php BB