[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Urgent: how to rescan SCSI channel for new drives?



Hallo Nico,

Nico De Ranter <nico@sonycom.com> writes:

> is it possible to add a scsi drive to a Linux system without 
> having to reboot the machine i.o.w. is there a way to rescan
> the scsi bus (cfr "drvconfig; disks" on Solaris) ?

this simple script works fine for me:

,----
| #!/bin/sh
| 
| for HOST in 0 1 2 3 4 5 6; do
|   for CHANNEL in 0 1; do
|     for ID in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|       for LUN in 0 1 2 3 4 5 6 7; do
|         echo -ne "scanning: ${HOST} ${CHANNEL} ${ID} ${LUN}  \r"
|         echo "scsi remove-single-device ${HOST} ${CHANNEL} ${ID} ${LUN}" > /proc/scsi/scsi
|         echo "scsi add-single-device ${HOST} ${CHANNEL} ${ID} ${LUN}" > /proc/scsi/scsi
|       done
|     done
|   done
| done
| 
| cat /proc/scsi/scsi
`----


 Martin



Reply to: