How to rescan the SCSI bus in Linux

October 28, 2010 — 18 Comments

You are in front of a Linux box, a VM really, with a bunch of new disks that must be configured and suddenly you remember that there is no ioscan in Linux, you will ask yourself ‘who is so stupid to create an operative system wihtout ioscan?’ at  least I did x-)

Yes it is true, there is no ioscan in Linux and that means that everytime you add a new disk to one of your virtual machine you have to reboot it, at least technically that is the truth. But don’t worry there is a quick and dirty way to circumvent that.

From a root shell issue the following command:

[root@redhat ~]# echo "- - -" > /sys/class/scsi_host/<host_number>/scan

After that if you do a fdsik -l will see the new disks.

If you want to rescan your box for new fiber channel disks the command is slightly different.

[root@redhat ~# echo "1" > /sys/class/fc_host/host#/issue_lip

For the fiber channel part there are also third party utilities. HP for example provides hp_rescan which comes with the Proliant Support Pack.

[root@redhat /]# hp_rescan -h
hp_rescan: rescans LUNs on HP supported FC adapters
Usage: hp_rescan -ailh[n]

-a: rescan all adapters
-i: rescan a specific adapter instance. The specific device should be a
 SCSI host number such as "0" or "6"
-l: lists all FC adapters
-n: do not perform "scsi remove-single-device" when executing probe-luns
-h: help
[root@redhat /]#

If you know other ways to rescan the SCSI bus in a Linux server please comment :-)



18 responses to How to rescan the SCSI bus in Linux


    On Debian Linux, the scsitools provides the script /sbin/


      Hi Yves! Thanks for the info, didn’t know debian had such script :-)


        Their lack of social media plugin for wordpress business experience and ability
        to communicate and promote their messages.

        They didn’t spend a dime on traditional media. You
        can also visit Facebook’s legal site to viewthe complete
        list of rules and regulationsDo any of these buttons.


        “When we got married I knew what I was getting myself into. Green Goblin looked down and noticed Spider-Man wasn’t there. Aquarius as the rebellions spirit and trendsetter is forging ahead into new adventures.


    This really is the fourth article, of yours I browsed. But yet I really like this specific one, “How
    to rescan the SCSI bus in Linux Juanma’s Blog” the very best. All the best ,Liam


    On RedHat, the “sg3_utils” provides the “scsi-rescan” command.


    You really make it appear really easy alng with your presentation however I find this
    matter to be really one thing that I bellieve I’d by no means
    understand. It sort of feels too complicated and extremely huge for me.
    I’m taking a look ahead to your next publish, I’ll try
    to get the hold of it!


    Hello colleagues, hoow is the whole thing, and what you would like to say on the topic of this article, in my view itss truly remarkable designed for me.


    I was wondering if you ever thought of changing the structure of your site?
    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or two pictures.
    Maybe you could space it out better?


      Normally I don’t read post on blogs, but I would like to say that this write-up
      very pressured me to take a look at and ddo so! Your writing style has been surprised me.
      Thanks, very nice article.


    In today’s business environment, social media is a business tool for gaining ad pushing the frontier of
    competitive advantage. The internet has more information in one day than the whole of human history until 2004.

    Don’t copy this content, but use a unique variation of that basic
    idea to boost your own results.


    Mattt Stone grew up anԀ ent to higɦ school in Littleton.
    Episodes ɑre typically written aոd produced ɗuring the
    week prior toits broadcast, աith thе vast vast
    majorityof ѕhows beng written, directed, ɑnɗ
    acted by Parker anԁ Stone. Frnch cinema ɦas been in the habit of discarding іtѕ biɡ names rather quickly afteг their breakthrough hits.


    Or also if you’re interested in finding games similar to Runescape
    Account we can help you out. For the stock trader with prior knowledge, this can be
    a fortunate advantage. Placement the ball ahead in your stance,
    have minimal arm swing in the takeaway and use a slight hinging of the wrists.


    Can I simply say what a comfort to uncover someone who genuinely understands what they are discussing online.
    You definitely understand how to bring a problem to light
    and make it important. More and more people ought to look at this and understand this
    side of the story. I was surprised that you are not more popular because you most certainly have the gift.

    Jonathan Hutchins October 3, 2014 at 20:09

    sg3_utils in Red Hat has a “rescan-scsi-bus” script


    naturally like your web-site but you have to check the spelling on quite a few of your posts.
    A number of them are rife with spelling issues and I find it very troublesome to inform the truth nevertheless I’ll surely come
    back again.

Trackbacks and Pingbacks:

  1. How to rescan the SCSI bus in Linux « Juanma's Blog | Linux Affinity - October 30, 2010

    […] the original post: How to rescan the SCSI bus in Linux « Juanma's Blog Posted in: How To's ADD […]

  2. Escaneo de nuevo almacenamiento SCSI | Linux Trucupei Blog - October 21, 2015

    […] Enlace: […]

Leave a Reply

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

You are commenting using your 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