On a server or virtual machine , Generally, hot swap hard disk will be realized . here CentOS7 It's impossible to read a new disk , So it needs to be scanned again .

Let's add a new hard drive Demo :

[root@xuexi ~]# ls /dev/sd* // There should be another sdb, But it didn't show 
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3
[root@xuexi ~]# for i in /sys/class/scsi_host/host*/scan;do echo "- - -" >$i;done
[root@xuexi ~]# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sdb

This is a loop statement , Commonly used in /sys/class/scsi_host/ Use when there are too many files .

for i in /sys/class/scsi_host/host*/scan;do echo "- - -" >$i;done

CentOS7 How to read a new hard disk in hot swap

  1. 003 centos7 Turn off the firewall in

    stay centos7 in , There's a new change in the firewall . Here are some common commands . 1. Check the status systemctl status firewalld 2. Turn off firewall systemctl stop firewalld.s ...

  2. CAD Drawing in a web page , And write extended data and read extended data for the newly drawn object

    Drawing in a web page , And write extended data and read extended data for the newly drawn object . Here's a complete example of help , In the control installation directory Sample\Ie\iedemo.htm in . Mainly use function description : _DMxDrawX::InsertBlo ...

  3. Centos7 How to identify the newly added hard disk without restarting the system ?

    Today, insert three hard disks after the system is powered on , As a result, no hard disk is recognized by the system . And then we found a way . echo "- - -" > /sys/class/scsi_host/host0/scan On ...

  4. Centos7 in hadoop To configure

    Centos7 in hadoop To configure 1. download centos7 Installation tutorial : http://jingyan.baidu.com/article/a3aad71aa180e7b1fa009676.html ( Be careful ...

  5. Linux( With centos7 For example ) Automatically mount under the NTFS Hard disk

    Linux( With centos7 For example ) Automatically mount under the NTFS Hard disk author : Uncle Zijing Time of writing :2017 year 5 month 3 Wednesday, Sunday demand :      For familiarity Linux Use , Install a new one on your laptop centos7, But I ...

  6. centos7 Network card consistent naming rules in 、 Network card renaming method

    Consistent network device naming (Consistent Network Device Naming) Background introduction : stay centos5 When , We're used to it eth0 Such a network device is named , stay centos6 Discover that network devices have become em ...

  7. Learning notes :CentOS7 Learning 13 (1): Introduction to hard disk

    1. SAS-SATA-SSD-SCSI-IDE Hard disk explanation 1.1 Common hard disk types : SAS Hard disk :SAS(Serial Attached SCSI), Serial connection SCSI Interface , Serial connection small computer system interface .SA ...

  8. centos7 Network card name related knowledge in

    Reprinted from https://www.cnblogs.com/zyd112/p/8143464.html Consistent network device naming (Consistent Network Device Naming) Background introduction : stay ...

  9. Centos7 Disk management and expansion

    Prerequisites : virtual machine :centos7 Virtual machine software :VMware Workstation 12 In the installation Centos System time , Disk selection is LVM Logic volume . When the choice is LVM After that, the logical volume can be created ( must ) The data format is ...

Random recommendation

  1. use JavaScript Modify browser tab title

    modify tab perhaps window The title of the , It's an older practice .Gmail Use it to prompt users for new chat messages , When there is a new page adopt AJAX When loading , This site also uses it to update tab title. How can this be done ? It was by setting up ...

  2. Easyui Use records

    In one day, I did these lines . 1. if else Can be nested : 2. The child page calls the parent page js, Need to use top. Parent page js Methods . <script type="text/javascript&qu ...

  3. Power-BI Help Gu de medicine to help the world and the people

    Company profile was established in 2011 year 9 month 24 Japan , It's mainly a hospital sales company , Wholesale . Delivery . After sales service in one of the commercial companies . Existing drug reserve area 16000 Square meters , Open an account in a hospital 52 home , The marketing network radiates some counties in Shanxi Province ...

  4. Mobile front end development viewport Summarize and organize

    1. Generally speaking, on mobile devices viewport It's the area on the device's screen that can be used to display our web page , But not the browser view . In general , On mobile devices viewport Should be larger than the viewable area of the browser . The browser on the mobile device will put the default ...

  5. linux article (11)---umask and chmod

    One . purpose This article will introduce linux Environment on file access mode related commands .         umask Used to set the default file access mode mask value :chmod To change the access mode of a file .         This article will choose ubuntu1 ...

  6. Jquery Chinese date plug-in jquery.datepick Use

    jsp Code for : <%@ page language="java" contentType="text/html; charset=UTF-8" pageE ...

  7. Matrix fast power AC Code HDU 2035

    #include <iostream> using namespace std;const int MOD = 1000;// A constant like this should be specially defined int PowMod(in ...

  8. Website operation and maintenance tools use iis Log analysis tool analysis iis journal (iis Log configuration )

    We can only analyze the health of the website through various system logs , For deployment in IIS For the website on ,IIS Logs provide the most valuable information , We can use it to analyze the response of the website , To determine whether the website has performance problems , Or what needs to be improved Yes ...

  9. Luogu P1879 Problem solving report

    P1879 [USACO06NOV] Corn field Corn Fields Title Description farmer \(John\) Bought a new rectangular ranch , The ranch is divided into \(M\) That's ok \(N\) Column \((1 ≤ M ≤ 12; 1 ≤ ...

  10. Use PHP operation ElasticSearch

    How to build ES Environment and use CURL Operation can refer to my another article :ElasticSearch Try There's a lot on the Internet about ES All the examples are out of date , It's been a long time , The test environment for this article is ES6.5 adopt composer  install comp ...