Add a New Disk/Lun to RHEL5/CentOS5 without Rebooting

Ming Honestly I cannot believe that i have not put this one up on Fatmin before. I have to add new disks to RHEL servers all the time and can never remember I can never remember this procedure. I end up hitting up google all the time.

Anyway the command below causes a rescan of the scsi bus which is what you need to do for your server to detect a newly added disk. I find myself doing this on virtual machines all the time. Oh and for the love of all that is holy, please create your new disk a logical volume, and dont be lazy and just format the disk and stick a filesystem on it.

In this example I am using host0 as the target, however this may differ on your box.

echo “- – -” > /sys/class/scsi_host/host0/scan

One thought on “Add a New Disk/Lun to RHEL5/CentOS5 without Rebooting

  1. There’s an even easier way. You can download the Qlogic tools which have a script that will run a scsi scan on all scsi_hosts (assuming you have multiple paths when not dealing with vmware).
    Scroll down and download Linux Utilities.
    If you have emulex adapters, then you want to download the script.
    You will need the following packages for this to work:
    libnl (for more information, refer to
    sg3_utils (for more information, refer to


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 )

Google+ photo

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

Connecting to %s