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

  • Follow


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

0
Reply kai.klesatschke (3) 11/18/2004 9:12:34 AM

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


0
Reply Rob 11/18/2004 11:05:53 AM


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

0
Reply Kai 11/18/2004 4:29:27 PM

Kai Klesatschke wrote:

> 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)
0
Reply Dave 11/19/2004 6:22:21 PM

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

> 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/
0
Reply John 11/23/2004 5:58:45 PM

4 Replies
262 Views

(page loaded in 0.084 seconds)

Similiar Articles:










7/24/2012 2:33:54 AM


Reply: