Home > Linux, Redhat > Dynamically scan your LUNs for new hosts without reboot

Dynamically scan your LUNs for new hosts without reboot

echo “- – -” > /sys/class/scsi_host/<host listings>/scan

 <host listings> refer to the scsi host instances (for the hbas). if you do a listing of the scsi_host directory, you will see something similar to the following:
[root@r08u6 scsi_host]# ll
total 0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host1
drwxr-xr-x 2 root root 0 Aug 4 15:52 host2

as you can see, on this server it shows 3 instances of scsi host entries. by using the echo command above on each of these directory’s “scan” files it will force a re-read of the specific scsi bus.

This procedure has been tested on RHEL5 successfully without interruption to the system.

If you have PowerPath installed on the system, run “powermt config” to look for the new devices.

For RHEL 3:
echo “scsi scan-new-devices” > /proc/scsi/scsi

Categories: Linux, Redhat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: