我在 Seagate Blackarmor 440 nas 中有一个 raid5 阵列,突然开始显示磁盘 1 和 4“故障”。我将所有驱动器移到 Ubuntu 盒子上,并尝试使用 mdadm 组装阵列。长话短说,这就是我的情况。
看起来 Seagate 为 fs、交换、硬重置文件以及最终的数据创建了一个 raid 分区。fs、交换和“硬重置文件”位于 raid 1 中,但数据位于 raid 5 中。如果我执行 mdadm --assemble --scan,我会得到
sudo mdadm --assemble --scan
mdadm: /dev/md0 has been started with 4 drives.
mdadm: /dev/md1 has been started with 3 drives (out of 4).
mdadm: /dev/md2 has been started with 3 drives (out of 4).
其中 md0 是文件系统,md1 是交换,md2 是重置内容,但 md3 没有出现。
驱动器看起来不错,只是插槽分配似乎错误 (-1)
sudo mdadm --assemble --run /dev/md3 /dev/sd[abcd]4 --verbose --force
mdadm: looking for devices for /dev/md3
mdadm: /dev/sda4 is identified as a member of /dev/md3, slot -1.
mdadm: /dev/sdb4 is identified as a member of /dev/md3, slot 2.
mdadm: /dev/sdc4 is identified as a member of /dev/md3, slot 1.
mdadm: /dev/sdd4 is identified as a member of /dev/md3, slot -1.
mdadm: no uptodate device for slot 0 of /dev/md3
mdadm: added /dev/sdb4 to /dev/md3 as 2
mdadm: no uptodate device for slot 3 of /dev/md3
mdadm: added /dev/sda4 to /dev/md3 as -1
mdadm: added /dev/sdd4 to /dev/md3 as -1
mdadm: added /dev/sdc4 to /dev/md3 as 1
mdadm: failed to RUN_ARRAY /dev/md3: Input/output error
mdadm: Not enough devices to start the array.
cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md3 : inactive sdb4[2](S) sdc4[1](S) sdd4[4](S) sda4[0](S)
7802831488 blocks super 1.2
md2 : active raid1 sda3[0] sdb3[2] sdc3[1]
521408 blocks [4/3] [UUU_]
md1 : inactive sdd2[3](S) sdc2[1](S) sda2[0](S) sdb2[2](S)
4179200 blocks
md0 : active raid1 sdc1[1] sdd1[3] sda1[0] sdb1[2]
1043840 blocks [4/4] [UUUU]
unused devices: <none>
有没有办法告诉 mdadm 按照什么顺序构建数组?