{"id":97,"date":"2020-02-06T06:13:57","date_gmt":"2020-02-06T06:13:57","guid":{"rendered":"http:\/\/ictbank.ir\/blog\/?p=97"},"modified":"2020-03-26T00:52:18","modified_gmt":"2020-03-26T00:52:18","slug":"add-new-disk-to-redhat-based-linux-without-reboot","status":"publish","type":"post","link":"https:\/\/ictbank.ir\/blog\/add-new-disk-to-redhat-based-linux-without-reboot\/","title":{"rendered":"Add New Disk to RedHat-based Linux without reboot"},"content":{"rendered":"\n<p>If you add a new disk to your OS, you won&#8217;t find this device in the device list (fdisk -l command). So you have two options to make it available:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Reboot your machine<\/li><li>Make the OS rescan all connected devices<\/li><\/ol>\n\n\n\n<p>In operational environments, the first option is not considerable. So we have to choose the second approach:<\/p>\n\n\n\n<p>To do so you have to write &#8220;- &#8211; -&#8221; to \/sys\/class\/scsi_host\/host*\/scan files:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfor filename in \/sys\/class\/scsi_host\/host*; do\n    echo &quot;- - -&quot; &gt; $filename\/scan\ndone\n<\/pre><\/div>\n\n\n<p>after that you will find the new device in the fdisk -l command&#8217;s results.<\/p>\n <p>If you add a new disk to your OS, you won&#8217;t find this device in the device list (fdisk -l command). So you have two options to make it available:<\/p>\n<!-- \/wp:post-content -->\n\n<!-- wp:list {\"ordered\":true} -->\n<ol><li>Reboot your machine<\/li><li>Make the OS rescan all connected devices<\/li><\/ol>\n<!-- \/wp:list -->\n\n<!-- wp:paragraph -->\n<p>In operational environments, the first option is not considerable. So we have to choose the second approach:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>To do so you have to write &#8220;- &#8211; -&#8221; to \/sys\/class\/scsi_host\/host*\/scan files:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:syntaxhighlighter\/code -->\n<pre class=\"wp-block-syntaxhighlighter-code\">for filename in \/sys\/class\/scsi_host\/host*; do\n    echo \"- - -\" > $filename\/scan\ndone<\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n\n<!-- wp:paragraph -->\n<p>after that you will find the new device in the fdisk -l command&#8217;s results.<\/p>\n<!-- \/wp:paragraph -->","protected":false},"excerpt":{"rendered":"<p>If you add a new disk to your OS, you won&#8217;t find this device in the device list (fdisk -l command). So you have two options to make it available: Reboot your machine Make the OS rescan all connected devices In operational environments, the first option is not considerable. So we have to choose the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":{"footnotes":""},"categories":[53,55,1,51,54,50,52],"tags":[48,40,44,45,41,39,4,42,49,47,43,46],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-centos","category-fedora","category-installation","category-linxu","category-oraclelinux","category-os","category-redhat","tag-adddisk","tag-centos","tag-disk","tag-fdisk","tag-fedora","tag-ictbank","tag-linux","tag-oraclelinux","tag-os","tag-reboot","tag-redhat","tag-scsi"],"_links":{"self":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":4,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":137,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions\/137"}],"wp:attachment":[{"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ictbank.ir\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}