如何修复软件RAID5磁盘?


11

我不小心拔掉了eSATA电缆,同时在办公桌后面重新布线,并使RAID阵列脱机。

我相信驱动器很好,但是它们现在显示为“已移除”状态,如何重新初始化阵列?

mdadm --detail /dev/md1 显示:

/dev/md1:
        Version : 00.90
  Creation Time : Wed Oct 20 20:00:41 2010
     Raid Level : raid5
     Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
  Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Mon Oct  3 18:39:41 2011
          State : clean, degraded
 Active Devices : 0
Working Devices : 0
 Failed Devices : 4
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       0        0        1      removed
       2       0        0        2      removed
       3       0        0        3      removed

       4       8       32        -      faulty spare
       5       8       48        -      faulty spare
       6       8       16        -      faulty spare
       7       8       64        -      faulty spare

这是mdstat:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid5 sdc[4](F) sdd[5](F) sdb[6](F) sde[7](F)
      5860543488 blocks level 5, 64k chunk, algorithm 2 [4/0] [____]

unused devices: <none>

Answers:


13

看起来有点像您设法从阵列上拆除了所有四个驱动器?我认为您会获得某种成就徽章。:-)

您应该能够将它们重新添加到数组中:

sudo mdadm /dev/md1 --re-add /dev/sd[bcde]

然后watch cat /proc/mdstat看到它重建它们。

有关更多信息,请参见man mdadm


2
watch cat /proc/mdstat在重建中运行以获取实时状态。我会警告您:这就像看着油漆干燥。
奥利(Oli)

1
说谎!看着cat / proc / mdstat是我的过去。如果执行“ -d”和“ -n 0.1”,则特别好。
popey 2011年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.