<< DomainKeys for Postfix on Red Hat ES 4 | Home | Tomcat on Plesk in the DocumentRoot >>

SCSI bus rescan

Here's a good one that I had to deal with recently.  Two drives being removed and one going in its place.  The kicker is that they wanted zero downtime.  Cool, except there's no RAID and it's just a bunch of drives in the box.  Here's what I wound up following in order to re-read the new drive and flush out the old data:


################### 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

It's rather straightforward for the technically minded folks.  Shame it requires echoing crap to /proc, since there be dragons in /proc