磁盘故障后如何在 ubuntu 中重新组装软件 RAID 10?目前它只有 3 个磁盘,并且显示为 RAID 0-Inactive

磁盘故障后如何在 ubuntu 中重新组装软件 RAID 10?目前它只有 3 个磁盘,并且显示为 RAID 0-Inactive

磁盘故障后,我的 RAID 10 系统降级为 RAID 0 - 不活动。它在带有组件(/dev/sda、/dev/sdb、/dev/sdc、/dev/sdd)的 ubuntu 18.04 上运行。如何更换故障磁盘 (/dev/sda) 并重新组装 RAID 10 系统而不丢失数据?

我尝试使用 mdadm 组装系统失败,并出现以下错误:

sudo mdadm --assemble /dev/md126 --uuid abaac928:7741653b:cf17fcec:bf6572d3 --verbose

mdadm: looking for devices for /dev/md126
mdadm: no recogniseable superblock on /dev/md/ubuntu-server:0
mdadm: no recogniseable superblock on /dev/sdg2
mdadm: no recogniseable superblock on /dev/sdg1
mdadm: Cannot assemble mbr metadata on /dev/sdg
mdadm: /dev/sdf has wrong uuid.
mdadm: /dev/sde has wrong uuid.
mdadm: No super block found on /dev/sda (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/sda
mdadm: No super block found on /dev/loop1 (Expected magic a92b4efc, got b4d75336)
mdadm: no RAID superblock on /dev/loop1
mdadm: No super block found on /dev/loop0 (Expected magic a92b4efc, got b4d75336)
mdadm: no RAID superblock on /dev/loop0
mdadm: /dev/sdd is identified as a member of /dev/md126, slot 2.
mdadm: /dev/sdc is identified as a member of /dev/md126, slot 1.
mdadm: /dev/sdb is identified as a member of /dev/md126, slot 0.
mdadm: added /dev/sdc to /dev/md126 as 1
mdadm: added /dev/sdd to /dev/md126 as 2 (possibly out of date)
mdadm: no uptodate device for slot 3 of /dev/md126
mdadm: added /dev/sdb to /dev/md126 as 0
mdadm: /dev/md126 assembled from 2 drives - not enough to start the array.

系统剩余 3 个磁盘分别是 /dev/sdb、/dev/sdc、/dev/sdd 以下是 /dev/sd[bcd] 磁盘的状态:

sudo mdadm --examine /dev/sdd
/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : abaac928:7741653b:cf17fcec:bf6572d3
           Name : ubuntu-server:0
  Creation Time : Wed Jan  8 22:10:46 2020
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 7813772976 (3725.90 GiB 4000.65 GB)
     Array Size : 7813772288 (7451.79 GiB 8001.30 GB)
  Used Dev Size : 7813772288 (3725.90 GiB 4000.65 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=688 sectors
          State : clean
    Device UUID : dd5aab0c:b1799a3f:78f4f65f:c89e538b

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Apr 28 23:45:11 2023
  Bad Block Log : 512 entries available at offset 40 sectors
       Checksum : b2a92143 - correct
         Events : 1912260

         Layout : near=2
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : AAA. ('A' == active, '.' == missing, 'R' == replacing)

我已经更换了故障磁盘 /dev/sda,但无法将其连接到系统,因为无法识别 RAID 10。

需要有关如何组装阵列并再次识别为 RAID 10 以恢复数据的帮助。

相关内容