Linux – rescanning the SCSI bus

When new SCSI devices are added to a Linux system, it is necessary to re-scan the SCSI bus so that the OS can add them to the device list:

[root@localhost ~]# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3

[root@localhost ~]# su -c 'for hst in $(ls /sys/class/scsi_host) ; do echo "- - -" > /sys/class/scsi_host/$hst/scan ; done'

[root@localhost ~]# ls /dev/sd*
 /dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sdb

[root@localhost ~]#
Advertisements

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