AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1148467
Accepted
Leonardo Ramé
Leonardo Ramé
Asked: 2023-11-24 03:22:48 +0800 CST2023-11-24 03:22:48 +0800 CST 2023-11-24 03:22:48 +0800 CST

如何在 Linux Raid (mdadm) 上更换故障磁盘

  • 772

当我列出带有以下内容的驱动器时,出现输入/输出错误:fdisk -l

Failed to read extended partition table (offset=3886721022): Input/output error
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7ac0eeb9

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sda1             2048 3886718975 3886716928  1.8T fd Linux raid autodetect
/dev/sda2       3886721022 3907028991   20307970  9.7G  5 Extended

Partition 2 does not start on physical sector boundary.


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7ac0eeb9

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1             2048 3886718975 3886716928  1.8T fd Linux raid autodetect
/dev/sdb2       3886721022 3907028991   20307970  9.7G  5 Extended
/dev/sdb5       3886721024 3907028991   20307968  9.7G fd Linux raid autodetect

Partition 2 does not start on physical sector boundary.


Disk /dev/md1: 9.7 GiB, 10389291008 bytes, 20291584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md0: 1.8 TiB, 1989864849408 bytes, 3886454784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

然后,/proc/mdstat:

Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb1[2]
      1943227392 blocks super 1.2 [2/1] [_U]
      bitmap: 15/15 pages [60KB], 65536KB chunk

md1 : active raid1 sdb5[2]
      10145792 blocks super 1.2 [2/1] [_U]
      
unused devices: <none>

然后:mdadm --detail /dev/md0:

/dev/md0:
        Version : 1.2
  Creation Time : Tue Mar 20 06:41:14 2018
     Raid Level : raid1
     Array Size : 1943227392 (1853.21 GiB 1989.86 GB)
  Used Dev Size : 1943227392 (1853.21 GiB 1989.86 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Nov 23 16:21:07 2023
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : impacs:0
           UUID : 619c5551:3e475969:80882df7:7da3f864
         Events : 18817061

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       2       8       17        1      active sync   /dev/sdb1

然后:mdadm --detail /dev/md1:

/dev/md1:
        Version : 1.2
  Creation Time : Tue Mar 20 06:41:40 2018
     Raid Level : raid1
     Array Size : 10145792 (9.68 GiB 10.39 GB)
  Used Dev Size : 10145792 (9.68 GiB 10.39 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Thu Nov 23 14:19:34 2023
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : impacs:1
           UUID : 1b9a0dc4:cc30cd7e:274fefd9:55266436
         Events : 70615

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       2       8       21        1      active sync   /dev/sdb5

我没看到/dev/sda那里,我怎么知道它是否在RAID中使用?

linux
  • 1 1 个回答
  • 63 Views

1 个回答

  • Voted
  1. Best Answer
    tsc_chazz
    2023-11-24T05:25:24+08:002023-11-24T05:25:24+08:00

    我看到的唯一线索是:

    /dev/sda1             2048 3886718975 3886716928  1.8T fd Linux raid autodetect
    

    看起来您的/dev/sda分区表(可能)/dev/sda1非常混乱,以至于 RAID 不会尝试保留其中一个sda1或不再sda5在磁盘阵列中可用。所以我想说,大约 99% 的确定是/dev/sda您的 RAID 阵列的一半,并且它已经失效并且需要更换。

    • 1

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve