geekpeek.net
Open in
urlscan Pro
185.47.61.99
Public Scan
URL:
https://geekpeek.net/rescan-scsi-bus-on-linux-system/
Submission: On May 09 via manual from GB — Scanned from NL
Submission: On May 09 via manual from GB — Scanned from NL
Form analysis
1 forms found in the DOMGET https://geekpeek.net/
<form role="search" method="get" class="g1-searchform-tpl-default g1-form-s search-form" action="https://geekpeek.net/">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:">
</label>
<input type="submit" class="search-submit" value="Search">
</form>
Text Content
Menu Skip navigation Menu * Home * Linux * Smartphones & Gadgets * Blog You are here: 1. Home 2. Linux 3. Rescan SCSI bus on Linux System ShareFacebook, Twitter, Google Plus, Pinterest, Email Print Posted in: * Linux RESCAN SCSI BUS ON LINUX SYSTEM July 21, 2015, 12:54 0 Comments SCSI stands for Small Computer System Interface and is a set of standards for transferring data and connecting devices and computers. Sometimes you make changes to disk devices on your Linux box while online which is even more often nowadays using virtual machines. Sometimes you also add a new disk and do not want to restart your Linux system. Wether you need to add a new disk or increase an existing disk size of your virtual machine, the changes will not be instantly visible from the Linux operating system because you need to rescan SCSI bus on Linux to see the change. It is quite easy to rescan SCSI bus on Linux, you can do it with a simple one line command (depending on the number of SCSI devices you have connected). Rescan SCSI bus on Linux Follow the steps described below and you will see the new size of your disk. RESCAN SCSI BUS ON LINUX Please note that the rescan SCSI bus on Linux does not interrupt operating system operation nor remove any of the disks. Rescanning SCSI bus on Linux with the below procedure will add/freshen devices but not remove them. WHEN ADDING A NEW DISK When adding a new disk to your Linux system you need to rescan SCSI host. You can do this with the following command: echo "- - -" > /sys/class/scsi_host/hostX/scan ..where X is the number of SCSI host to scan. You probably have more than one SCSI host available so to make it right you should repeat the above command for each SCSI host available. Below is a practical example on how to rescan SCSI bus on Linux and and see the newly added disk: [root@node-1 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan [root@node-1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan [root@node-1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan The “- – -” part is where you tell the SCSI host what exactly to rescan and the hyphens are wildcards which tell SCSI host to rescan all controllers, channels and LUNs. WHEN INCREASING EXISTING DISK SIZE If you changed the size of an existing disk you might notice that the operating system can not see the new disk size until you rescan SCSI bus on Linux operating system. The easiest way i’ve found is to rescan the specific device with the following command: echo "1" > /sys/class/block/sdX/device/rescan ..where X is the device you increased and want to rescan. Below is a practical example on how to rescan SCSI bus on Linux and and see the newly added disk: [root@node-1 ~]# echo "1" > /sys/class/block/sdb/device/rescan The “1” is a flag which causes the SCSI host to rescan the “sdb” block device and therefore refresh the data about the disk size. Please note that i choose this command due to the human readable “sdb” naming which is really easy to remember. Otherwise the command could also be triggered as follows: [root@node-1 ~]# echo "1" > /sys/class/scsi_device/2:0:1:0/device/rescan ..but in the last case you should know which device you want to rescan by the SCSI bus ID. Tagged with: centos6, centos7, scsi ShareFacebook, Twitter, Google Plus, Pinterest, Email See more * Previous article Meizu MX5 – Chinese Smartphone You Should Buy at Gearbest.com * Back All Entries * Next article Bash Aliases and SUDO – sudo: ll: command not found YOU MAY ALSO LIKE 123 * Posted in: * Linux EXTEND SNMP – RUN BASH SCRIPTS VIA SNMP by Mitch February 18, 2016 8 Comments * Posted in: * Linux ZENOSS – USER-SUPPLIED PYTHON EXPRESSION ((HERE.SPEED OR 1E9) / 8 * .75) FOR MAXIMUM VALUE CAUSED ERROR by Mitch November 18, 2015 1 Comment * * * * * delicious * facebook * googleplus * linkedin * stumbleupon * tumblr * twitter Search for: SPONSORED BY MYTHIC BEASTS RSS MYTHIC BEASTS TWITTER GOOD STUFF ElectricalSchool.org Learning resources for electricians and electronics geeks RELATED POSTS * EXTEND SNMP – RUN BASH SCRIPTS VIA SNMP February 18, 2016 * ZENOSS – USER-SUPPLIED PYTHON EXPRESSION ((HERE.SPEED OR 1E9) / 8 * .75) FOR MAXIMUM VALUE CAUSED ERROR November 18, 2015 * POSTGRESQL SYNCHRONOUS STREAMING DATABASE REPLICATION August 10, 2015 * LOGS FILLED UP MY DISK – WHAT TO DO July 29, 2015 POPULAR POSTS * INSTALL NAGIOS CORE 4 ON UBUNTU 12.04 LTS January 23, 2014 * RESIZE PARTITION AND FILESYSTEM WITH FDISK & RESIZE2FS November 27, 2013 * CHECK_NRPE: ERROR – COULD NOT COMPLETE SSL HANDSHAKE June 21, 2013 * LINUX ON ANDROID – CAN YOU? May 6, 2013 TAGS android apache bash blog centos6 centos7 cluster configure corosync database debug doodgee dovecot drbd error everbuying fdisk filesystem flashsale gadgets gearbest install iptables lenovo lvm mysql nagios networking nfs oukitel pacemaker pnp4nagios postfix postgresql rpm security smartphones smartwatch ssh ubuntu ulefone user xiaomi yum zenoss MY BOOK META * Log in * Entries RSS * Comments RSS * WordPress.org RECENT COMMENTS * baraa albeak on How to install Linux – CentOS minimal install * Jayesh Pandey on This account is currently not available – Login Problem * Radu Dredetianu on Configure Postfix Mail Forward * Tashi Hyolmo on This account is currently not available – Login Problem * alsoft on Install and Configure Postfix with Dovecot on CentOS 6 RECENT POSTS * Running latest Apache 2.4 with PHP 7.0 on CentOS 6 * Running Nagios Core 4.1.1. on CentOS 7 * Playposter – Manage your screen content from anywhere * Extend SNMP – Run bash scripts via SNMP * Zenoss – User-supplied Python expression ((here.speed or 1e9) / 8 * .75) for maximum value caused error © 2015 by GeekPeek.Net Back to Top * Yorke Peninsula Council Enterprise Agreement * Wisconsin Asset Purchase Agreement * What Is One Negative Effect Of Participating In Free Trade Agreements * What Is A Periodic Lease Agreement Qld * What Countries Have A Visa Waiver Agreement With New Zealand * Vtex Agreements * Vehicle Sale Agreement Format In English India * Uk-China Agreement On Hong Kong * Treasury Board Collective Agreement * To Reach A Decision Or An Agreement About Something Or To End A Disagreement * Termination Agreement Germany * Telework Agreement Hud * Supply Agreement Law Insider * Subject Verb Agreement For Both * State Of Connecticut Consulting Agreement Affidavit * Specimen Loan Agreement Free * Single Case Agreement Guidelines * Short Sale Purchase Agreement Template * Settlement Agreement Muster * Separation Agreement In New York State