MD Raid 无法组装

MD Raid 无法组装

我的家庭服务器上运行着一个带有 3 个磁盘的 Raid5。但是磁盘的背板出现了一些问题。磁盘检测不可靠。所以我更换了背板,现在磁盘检测正确了。但是 Md 阵列奇怪地坏了。

当我查询物理磁盘时,mdadm -Q /dev/sdX我得到了以下信息:

root@omv:/etc/mdadm# mdadm -Q /dev/sdb
/dev/sdb: is not an md array
/dev/sdb: device 3 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.
root@omv:/etc/mdadm# mdadm -Q /dev/sdc
/dev/sdc: is not an md array
/dev/sdc: device 0 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.
root@omv:/etc/mdadm# mdadm -Q /dev/sdd
/dev/sdd: is not an md array
/dev/sdd: device 3 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.

然后用来mdadm --examine /dev/sdX获取更多信息,它给了我:

/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : b08f4b42:3d5d774b:46dd4460:10162e23

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 93cc85d - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : spare
   Array State : A.. ('A' == active, '.' == missing)

/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 3a5f2e45:a00ffef6:f1881208:258c62d6

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 12a86cfe - correct
         Events : 246

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : A.. ('A' == active, '.' == missing)

/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : d67e800b:e5372705:556cf02d:534eb1f5

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 2c50597d - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : spare
   Array State : A.. ('A' == active, '.' == missing)

可以看到,三个磁盘中有两个被标记为备用设备。mdstat 显示以下内容:

cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md127 : inactive sdc[0](S) sdd[3](S)
      3907027120 blocks super 1.2

unused devices: <none>

运行数组会产生以下错误:

mdadm: failed to run array /dev/md127: Input/output error

我还尝试手动组装阵列,但系统提示无法创建两个磁盘的阵列。有没有办法强制磁盘处于备用/活动状态并更改阵列中的磁盘编号?

相关内容