Centos不重啟添加新硬盤

 顯示當前磁盤分區:

[root@centos7 ~]# fdisk -l</p>< p>    Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk label type: dos

    Disk identifier: 0x0006b96a

       Device Boot      Start         End      Blocks   Id  System

    /dev/sda1   *        2048     1026047      512000   83  Linux

    /dev/sda2         1026048    62914559    30944256   8e  Linux LVM

    Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/mapper/centos-root: 29.5 GB, 29536288768 bytes, 57688064 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

確定主機總線號

[root@centos7 ~]# ls /sys/class/scsi_host/

    host0  host1  host2

重新掃描SCSI總線來添加設備

[root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan

[root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan

[root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan

 

試了下可以實現,但據大神說此方法比較危險,慎用!

原創文章,作者:ailu-cat,如若轉載,請注明出處:http://www.www58058.com/13469

(0)
ailu-catailu-cat
上一篇 2016-03-27 21:47
下一篇 2016-03-27 21:54

相關推薦

  • ansible

    Ansible 1、  特性: 模塊化:調用特定的模塊,完成特定任務; 基于Python語言實現部署簡單:agentless; 支持自定義模塊; 支持playbook;編排任務; ansible自身并不實現任何管理任務,它的所有管理任務,統統都使用模塊完成;             &nb…

    Linux干貨 2016-11-11
  • Nginx 功能概述與基礎應用!

           本篇博客主要有三個部分組成,目的在于讓大家了解ningx的主要功用及作為web server的基礎配置;通過本篇博客能夠讓您對nginx理解更加深入,以便于更好的使用它!                  …

    2017-05-14
  • 磁盤管理

    磁盤設備 一切皆文件 所有的Linux中的設備都可以使用下面命令進行操作:open(), read(), write(), close()(這些是C的函數) 塊設備:隨機訪問 字符設備:線性訪問 設備號碼: 主設備號:major number,標識設備類型 8是主要設備編號,代表類型 次設備號:minor number…

    Linux干貨 2016-09-01
  • LINUX下用戶管理命令簡述

    LINUX下用戶管理命令簡述 添加用戶并設置密碼 useradd [用戶名] 創建用戶 [root@localhost ~]# useradd jack [root@localhost ~]# cat /etc/shadow | grep jack jack:!!:17257:0:99999:7::: passwd [用戶名] 設置密碼 [root@loca…

    Linux干貨 2017-04-05
  • ip,ss,htop,vmstat,until,while,ping命令使用. N28

    第六周(2018-1.1 – 2018-1.7)

    2018-01-08

評論列表(1條)

  • stanley
    stanley 2016-03-27 21:49

    太粗糙了。

欧美性久久久久