Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm working with attaching new SCSI drives to a virtual host, and the current method in my team's work instructions is to rescan the SCSI bus with:

echo "- - -" > /sys/class/scsi_host/host0/scan

However, this was written a few years back, and we've moved on to newer Linux 3.2 systems. Is the method still echo "- - -"... so many things today in Linux are a bit nicer and less arcane... is there a new method I'm unaware or is this still how its done?

share|improve this question
1  
It's a virtual machine? This depends a lot on the hypervisor, and you failed to mention it. –  Michael Hampton Aug 24 '13 at 5:22
    
I'm not sure why the hypervisor is relevant, I'm working inside the Linux VM to rescan the SCSI bus. But, for what it's worth, its VmWare. –  Joe Aug 24 '13 at 5:38
1  
Which version of VMware? VMware is a company, not a product. And which drivers are you using? –  Michael Hampton Aug 24 '13 at 5:41
add comment

1 Answer 1

up vote 6 down vote accepted

In the Red Hat storage administration guide, the method you mentioned is there, along with some other options which you might prefer.

echo "- - -" > /sys/class/scsi_host/hosth/scan

[...] This procedure will add LUNs, but not remove them.

There's also the less arcane /usr/bin/rescan-scsi-bus.sh, which has the advantage that it can also remove devices.

The same /sys/class/scsi_host/ tree is still there in 3.2, so there's still nothing preventing one from scanning for new devices using that method.

share|improve this answer
    
Thanks Petter, good answer and good reference. –  Joe Aug 24 '13 at 14:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.