Sunday, November 15, 2009

How to Rescan SCSI Bus in Linux

I have a RHEL5 lab on my laptop, that's hosted on Vmware 7. For my RHCE prep I usually add/remove disks while the VM is up and running (hot swap). In order to make Redhat recognize the new disk you need to trigger the rescan of the SCSI bus :
echo “- - -” > /sys/class/scsi_host/hostX/scan
instead of hostX use the HBA ID. It's host0 in my case. Immediately after you can see the new disk on "fdisk -l"


NOTE : This works on 2.6 kernel only.

No comments:

Post a Comment