<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Scsi on Major Hayden</title><link>https://major.io/tags/scsi/</link><description>Recent content in Scsi on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Sun, 10 May 2026 09:15:13 +0000</lastBuildDate><atom:link href="https://major.io/tags/scsi/index.xml" rel="self" type="application/rss+xml"/><item><title>Re-scan the SCSI bus in Linux after hot-swapping a drive</title><link>https://major.io/p/re-scan-the-scsi-bus-in-linux-after-hot-swapping-a-drive/</link><pubDate>Thu, 23 Apr 2009 17:00:54 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/re-scan-the-scsi-bus-in-linux-after-hot-swapping-a-drive/</guid><description>&lt;p&gt;Servers with hot swappable drive bays are always handy. However, things can turn ugly if the SCSI controller doesn&amp;rsquo;t like a new drive when it is inserted. You may end up with these errors in your dmesg output:&lt;/p&gt;
&lt;pre lang="html"&gt;kernel: sdb : READ CAPACITY failed.
kernel: sdb : status=0, message=00, host=4, driver=00
kernel: sdb : sense not available.
kernel: sdb: Write Protect is off
kernel: sdb: Mode Sense: 00 00 00 00
kernel: sdb: asking for cache data failed
kernel: sdb: assuming drive cache: write through
kernel: sdb:&amp;lt;6&gt;sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0
kernel: Buffer I/O error on device sdb, logical block 0
kernel: sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0
kernel: Buffer I/O error on device sdb, logical block 0
kernel: sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0&lt;/pre&gt;
&lt;p&gt;The errors show that the SCSI bus is having issues bringing the new drive online, and it won&amp;rsquo;t be seen by the OS until the SCSI controller is pleased. You can force the controller to re-scan the drives attached to it, and this should correct the problem:&lt;/p&gt;
&lt;pre lang="html"&gt;cd /sys/class/scsi_host/hostX
echo "- - - " &gt; scan&lt;/pre&gt;
&lt;p&gt;Replace the &lt;strong&gt;X&lt;/strong&gt; with the proper controller number of your SCSI controller. If you&amp;rsquo;re not sure which controller is which, try running:&lt;/p&gt;
&lt;pre lang="html"&gt;# cat /sys/class/scsi_host/host0/proc_name
sata_nv&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Credit for this find goes to Tony Dolan&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>