zoukankan      html  css  js  c++  java
  • vmware新加磁盘fdisk看不到的处理

    虚拟机硬盘空间不够了,做了lvm准备加块硬盘扩容,在vcenter控制台加了磁盘,结果操作系统里面fdisk -l看不到新加的硬盘,又不想重启怎么办,一条命令就可以搞定。

    # 注意中间有空格
    echo "- - -" >  /sys/class/scsi_host/host0/scan



    [root@web03_back:/data]# fdisk -l

    Disk /dev/sda: 536.9 GB, 536870912000 bytes
    255 heads, 63 sectors/track, 65270 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000387ab

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          26      204800   83  Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2              26        1046     8192000   82  Linux swap / Solaris
    /dev/sda3            1046       65271   515890176   83  Linux
    [root@web03_back:/data]# echo "- - -" >  /sys/class/scsi_host/host
    host0/ host1/ host2/
    [root@web03_back:/data]# echo "- - -" >  /sys/class/scsi_host/host0/scan
    [root@web03_back:/data]# echo "- - -" >  /sys/class/scsi_host/host1/scan
    [root@web03_back:/data]# echo "- - -" >  /sys/class/scsi_host/host2/scan
    [root@web03_back:/data]# fdisk -l

    Disk /dev/sda: 536.9 GB, 536870912000 bytes
    255 heads, 63 sectors/track, 65270 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000387ab

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          26      204800   83  Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2              26        1046     8192000   82  Linux swap / Solaris
    /dev/sda3            1046       65271   515890176   83  Linux

    Disk /dev/sdb: 214.7 GB, 214748364800 bytes
    255 heads, 63 sectors/track, 26108 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000


    再用fdisk -l就看到了
    当然是host0还是host1,…,具体应该跟加硬盘时选择的挂载点有关系,不清楚就逐个试一遍好了

  • 相关阅读:
    zlib编译不过(Error A2070)解决方法(转)
    error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint) (转)
    MFC does not support WINVER less than 0x0501 解决方案(转)
    【程序打包工具 Inno Setup】转
    【Visual Studio】简单内存泄漏检测方法 解决 Detected memory leaks! 问题(转)
    各种版本QT下载地址与VS2013+QT5.3.1环境搭建过程(转)
    【Windows Message】MFC 通过F5,刷新桌面
    [bzoj]3343 教主的魔法
    NOIP2012 国王游戏
    NOIP模拟赛 路面修整
  • 原文地址:https://www.cnblogs.com/reblue520/p/11772775.html
Copyright © 2011-2022 走看看