无法重组 RAID10

无法重组 RAID10

我不确定这是否是值得询问的社区,但我想我可以尝试一下:

我们的服务器通过 rocketraid 2470 控制器运行 14 个驱动器 RAID10,但无法组装。我们的目标不一定是恢复正常工作的 RAID,而是尽可能多地恢复数据。

也许由于组装失败,关闭服务器后,它会卡在启动循环中。所以我目前正在从 USB 运行 Ubuntu 16.04.1。我确定 14 个磁盘中有 2 个有故障,并确定了它们是哪些。使用本指南,我已确定了哪些,并尝试在没有它们的情况下重新组装。但是,我一直遇到错误:

ubuntu@ubuntu:~$ sudo mdadm --assemble --verbose --force /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1
mdadm: looking for devices for /dev/md0
mdadm: /dev/sdc1 is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdd1 is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sde1 is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdf1 is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdg1 is identified as a member of /dev/md0, slot 4.
mdadm: /dev/sdh1 is identified as a member of /dev/md0, slot 5.
mdadm: /dev/sdi1 is identified as a member of /dev/md0, slot 6.
mdadm: /dev/sdj1 is identified as a member of /dev/md0, slot 7.
mdadm: /dev/sdk1 is identified as a member of /dev/md0, slot 8.
mdadm: /dev/sdl1 is identified as a member of /dev/md0, slot 9.
mdadm: /dev/sdm1 is identified as a member of /dev/md0, slot 10.
mdadm: /dev/sdn1 is identified as a member of /dev/md0, slot 11.
mdadm: /dev/sdo1 is identified as a member of /dev/md0, slot 12.
mdadm: /dev/sdp1 is identified as a member of /dev/md0, slot 13.
mdadm: added /dev/sdd1 to /dev/md0 as 1
mdadm: added /dev/sde1 to /dev/md0 as 2
mdadm: added /dev/sdf1 to /dev/md0 as 3
mdadm: added /dev/sdg1 to /dev/md0 as 4
mdadm: added /dev/sdh1 to /dev/md0 as 5
mdadm: added /dev/sdi1 to /dev/md0 as 6
mdadm: added /dev/sdj1 to /dev/md0 as 7
mdadm: added /dev/sdk1 to /dev/md0 as 8
mdadm: added /dev/sdl1 to /dev/md0 as 9
mdadm: added /dev/sdm1 to /dev/md0 as 10
mdadm: added /dev/sdn1 to /dev/md0 as 11 (possibly out of date)
mdadm: added /dev/sdo1 to /dev/md0 as 12 (possibly out of date)
mdadm: added /dev/sdp1 to /dev/md0 as 13 (possibly out of date)
mdadm: added /dev/sdc1 to /dev/md0 as 0
mdadm: /dev/md0 assembled from 11 drives - not enough to start the array.

这是 mdadm --examine 调用的输出。

ubuntu@ubuntu:~$ sudo mdadm --examine /dev/sd[c-p]1 | egrep 'Events | /dev/sd'
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 21988
   Events : 560
   Events : 21944
   Events : 560

因此,很明显,最后三个驱动器已经过期。驱动器 11 和 13 可能从未真正处于活动状态,但由于它们只是 raid 1 中的伙伴,因此阵列到目前为止未受到影响。我希望如果我可以重新组装第 12 个驱动器,那么我将能够恢复大部分数据。有人知道我该怎么办吗?我也尝试过不使用“非活动”驱动器,但仍然无法组装驱动器 12。我知道我可以尝试使用 --run,但我不确定我是否会以这种方式丢失数据。我也犹豫是否要将超级块归零,因为我一直听说这是最后的选择。

请注意,因为我是通过 USB 运行的,所以通常cat /proc/mdstat不会返回数组。另外,我不知道数组的结构(如果我知道的话,这会容易得多)。

先谢谢您的帮助。

答案1

如果你只想尝试恢复数据,你应该能够使用以下方法组装一个降级的、有点损坏的阵列:

sudo mdadm --assemble --verbose --force /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1 /dev/sdo1

请注意省略严重过期的/dev/sdn1驱动/dev/sdp1器。将阵列置于只读模式

sudo mdadm --readonly /dev/md0

并激活它

sudo mdadm --run /dev/md0

现在您可以挂载文件系统并尝试恢复数据。请注意,由于阵列处于只读模式,您可能需要传递挂载选项来抑制诸如日志重放或其他初始写入之类的操作。

由于/dev/sdo1已过期,并且可能与/dev/sdn1或配对/dev/sdp1,因此您将无法恢复所有内容。希望阵列仍处于良好状态,以便您能够安装它并恢复一些数据。

相关内容