3

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?

Joe
  • 472
  • 4
  • 15

1 Answers1

7

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.

Petter H
  • 3,383
  • 1
  • 14
  • 18