• 硬盘删除后出错处理 (REDHAT 7)


    以下是转载的内容:
    硬盘删除后centos出错处理
    一台机器centos6.4在新增加一个硬盘后,重新加载光纤卡后,可以正常显示。再将这块硬盘删除后使用命令:pvs与vgs报错:
    [root@mongodb-back host2]# pvscan
      /dev/sdh: read failed after 0 of 1024 at 0: Input/output error
      /dev/sdh: read failed after 0 of 1024 at 2199023124480: Input/output error
      /dev/sdh: read failed after 0 of 1024 at 2199023243264: Input/output error
      /dev/sdh: read failed after 0 of 1024 at 4096: Input/output error
      /dev/sdh: read failed after 0 of 2048 at 0: Input/output error
      PV /dev/sdb    VG mongovg          lvm2 [2.00 TiB / 0    free]
      PV /dev/sdc    VG mongovg          lvm2 [2.00 TiB / 0    free]
      PV /dev/sdd    VG mongovg          lvm2 [2.00 TiB / 1023.99 GiB free]
      PV /dev/sde    VG mongovg          lvm2 [2.00 TiB / 2.00 TiB free]
      PV /dev/sdf    VG mongovg          lvm2 [2.00 TiB / 2.00 TiB free]
      PV /dev/sda2   VG vg_mongodbback   lvm2 [99.51 GiB / 0    free]
                                                                   
    google后找到处理方案             
    #####
    Use lsscsi to determine which device is being used (you may need to install the program) then run lsscsi:


    # lsscsi
    [1:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR10 1.00  /dev/sr0
    [2:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda
    [2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb <== the removed physical disk
    [2:0:2:0]    disk    VMware   Virtual disk     1.0   /dev/sdc 
    Now write the delete file with


    # echo 1 > /sys/class/scsi_device/2:0:1:0/device/delete 
    The device is immediately gone.


    ###
    处理后正常 !


    以下是实际做的步骤:
    [root@localhost ~]# fdisk -l
    Disk /dev/sda: 1198.0 GB, 1198027440128 bytes, 2339897344 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes
    Disk label type: dos
    Disk identifier: 0x00000c03
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     1026047      512000   83  Linux
    /dev/sda2         1026048  2339897343  1169435648   8e  Linux LVM
    fdisk: cannot open /dev/sde: Input/output error
    [root@localhost ~]# lsscsi
    [0:2:0:0]    disk    AVAGO    MR9361-8i        4.66  /dev/sda
    [1:0:0:0]    enclosu THE      THE USS8000      132C  -       
    [1:0:1:0]    disk    THE      THE USS8000      132C  /dev/sdb
    [1:0:1:1]    disk    THE      THE USS8000      132C  /dev/sdc
    [1:0:1:2]    enclosu THE      THE USS8000      132C  -       
    [1:0:2:0]    disk    THE      THE USS8000      132C  /dev/sdd
    [1:0:2:1]    disk    THE      THE USS8000      132C  /dev/sde
    [1:0:2:2]    enclosu THE      THE USS8000      132C  -       
    [1:0:3:0]    enclosu THE      THE USS8000      132C  -       
    [1:0:4:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdf
    [1:0:5:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdg
    [1:0:7:0]    disk    EISOO    XSG1             4303  -       
    [1:0:7:1]    disk    EISOO    XSG1             4303  -       
    [1:0:8:0]    disk    EISOO    XSG1             4303  -       
    [1:0:8:1]    disk    EISOO    XSG1             4303  -       
    [9:0:0:0]    disk    THE      THE USS8000      132C  /dev/sdj
    [9:0:0:1]    disk    THE      THE USS8000      132C  /dev/sdk
    [9:0:0:2]    enclosu THE      THE USS8000      132C  -       
    [9:0:1:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdl
    [9:0:2:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdm
    [9:0:3:0]    enclosu THE      THE USS8000      132C  -       
    [9:0:4:0]    enclosu THE      THE USS8000      132C  -       
    [9:0:5:0]    disk    THE      THE USS8000      132C  /dev/sdn
    [9:0:5:1]    disk    THE      THE USS8000      132C  /dev/sdo
    [9:0:5:2]    enclosu THE      THE USS8000      132C  -       
    [9:0:9:0]    disk    DGC      LUNZ             0429  /dev/sdp
    [9:0:11:0]   disk    DGC      LUNZ             0429  /dev/sdq
    [9:0:12:0]   disk    HITACHI  OPEN-V           8301  /dev/sdr
    [9:0:13:0]   disk    HITACHI  OPEN-V           8301  /dev/sds
    [9:0:14:0]   disk    EISOO    XSG1             4303  -       
    [9:0:14:1]   disk    EISOO    XSG1             4303  -       
    [9:0:15:0]   disk    EISOO    XSG1             4303  -       
    [9:0:15:1]   disk    EISOO    XSG1             4303  -       
    [11:0:0:1]   disk    up       updisk           4303  /dev/sdh
    [root@localhost ~]# echo 1 > /sys/class/scsi_device/1:0:2:1/device/delete
    [root@localhost ~]# fidks -l
    bash: fidks: command not found...
    [root@localhost ~]# fdisk -l
    Disk /dev/sda: 1198.0 GB, 1198027440128 bytes, 2339897344 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes
    Disk label type: dos
    Disk identifier: 0x00000c03
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     1026047      512000   83  Linux
    /dev/sda2         1026048  2339897343  1169435648   8e  Linux LVM
    Disk /dev/sdf: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdg: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdb: 75.2 GB, 75161927680 bytes, 146800640 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/sdc: 85.9 GB, 85899345920 bytes, 167772160 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/sdd: 96.6 GB, 96636764160 bytes, 188743680 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/sdl: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdm: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes
    fdisk: cannot open /dev/sdo: Input/output error
    [root@localhost ~]# lsscsi
    [0:2:0:0]    disk    AVAGO    MR9361-8i        4.66  /dev/sda
    [1:0:0:0]    enclosu THE      THE USS8000      132C  -       
    [1:0:1:0]    disk    THE      THE USS8000      132C  /dev/sdb
    [1:0:1:1]    disk    THE      THE USS8000      132C  /dev/sdc
    [1:0:1:2]    enclosu THE      THE USS8000      132C  -       
    [1:0:2:0]    disk    THE      THE USS8000      132C  /dev/sdd
    [1:0:2:2]    enclosu THE      THE USS8000      132C  -       
    [1:0:3:0]    enclosu THE      THE USS8000      132C  -       
    [1:0:4:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdf
    [1:0:5:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdg
    [1:0:7:0]    disk    EISOO    XSG1             4303  -       
    [1:0:7:1]    disk    EISOO    XSG1             4303  -       
    [1:0:8:0]    disk    EISOO    XSG1             4303  -       
    [1:0:8:1]    disk    EISOO    XSG1             4303  -       
    [9:0:0:0]    disk    THE      THE USS8000      132C  /dev/sdj
    [9:0:0:1]    disk    THE      THE USS8000      132C  /dev/sdk
    [9:0:0:2]    enclosu THE      THE USS8000      132C  -       
    [9:0:1:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdl
    [9:0:2:0]    disk    NETAPP   LUN C-Mode       9200  /dev/sdm
    [9:0:3:0]    enclosu THE      THE USS8000      132C  -       
    [9:0:4:0]    enclosu THE      THE USS8000      132C  -       
    [9:0:5:0]    disk    THE      THE USS8000      132C  /dev/sdn
    [9:0:5:1]    disk    THE      THE USS8000      132C  /dev/sdo
    [9:0:5:2]    enclosu THE      THE USS8000      132C  -       
    [9:0:9:0]    disk    DGC      LUNZ             0429  /dev/sdp
    [9:0:11:0]   disk    DGC      LUNZ             0429  /dev/sdq
    [9:0:12:0]   disk    HITACHI  OPEN-V           8301  /dev/sdr
    [9:0:13:0]   disk    HITACHI  OPEN-V           8301  /dev/sds
    [9:0:14:0]   disk    EISOO    XSG1             4303  -       
    [9:0:14:1]   disk    EISOO    XSG1             4303  -       
    [9:0:15:0]   disk    EISOO    XSG1             4303  -       
    [9:0:15:1]   disk    EISOO    XSG1             4303  -       
    [11:0:0:1]   disk    up       updisk           4303  /dev/sdh
    [root@localhost ~]# echo 1 > /sys/class/scsi_device/9:0:5:1/device/delete
    [root@localhost ~]# fdisk -l
    Disk /dev/sda: 1198.0 GB, 1198027440128 bytes, 2339897344 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes
    Disk label type: dos
    Disk identifier: 0x00000c03
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     1026047      512000   83  Linux
    /dev/sda2         1026048  2339897343  1169435648   8e  Linux LVM
    Disk /dev/sdf: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdg: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdb: 75.2 GB, 75161927680 bytes, 146800640 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/sdc: 85.9 GB, 85899345920 bytes, 167772160 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/sdd: 96.6 GB, 96636764160 bytes, 188743680 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/sdl: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdm: 1099.5 GB, 1099529453568 bytes, 2147518464 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 65536 bytes

    Disk /dev/sdj: 75.2 GB, 75161927680 bytes, 146800640 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/sdk: 85.9 GB, 85899345920 bytes, 167772160 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/sdr: 107.4 GB, 107374182400 bytes, 209715200 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/sdn: 96.6 GB, 96636764160 bytes, 188743680 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/sds: 107.4 GB, 107374182400 bytes, 209715200 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/rhel-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes

    Disk /dev/mapper/rhel-swap: 4294 MB, 4294967296 bytes, 8388608 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes

    Disk /dev/sdh: 107.4 GB, 107374182400 bytes, 209715200 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: 0x585e11a1
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdh1            2048   209715199   104856576   83  Linux
    Disk /dev/mapper/rhel-home: 1139.5 GB, 1139516899328 bytes, 2225618944 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 262144 bytes / 262144 bytes

    Disk /dev/mapper/eisoovg-eisoo_lv: 106.3 GB, 106300440576 bytes, 207618048 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/sddlmaa: 107.4 GB, 107374182400 bytes, 209715200 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@localhost ~]# fdisk /dev/sdr
    Welcome to fdisk (util-linux 2.23.2).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    Device does not contain a recognized partition table
    Building a new DOS disklabel with disk identifier 0x4227419f.
    Command (m for help): p
    Disk /dev/sdr: 107.4 GB, 107374182400 bytes, 209715200 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: 0x4227419f
       Device Boot      Start         End      Blocks   Id  System
    Command (m for help): ^C
  • 相关阅读:
    关于react fiber的理解
    前段框架——VueX
    前段框架——Vue组件间传值
    前段框架——Vue的get和post请求数据
    前段框架——Vue的一级路由和二级路由
    前端框架——Vue脚手架
    前段框架——Vue
    关于Tomcat的BUG
    验证身份证号格式
    mysql 占用90%多的CPU,解决思路
  • 原文地址:https://www.cnblogs.com/jonathanyue/p/9301165.html
Copyright © 2020-2023  润新知