我遇到了一些问题,我的RAID-5阵列,使用mdadm和Debian。
首先,我丢失了一个驱动器(完全,它甚至没有被BIOS识别),然后我用一个新的驱动器替换了它;重建已经启动,但是由于第二个磁盘上的读取错误而中断了(这个磁盘已经被删除):
raid5:md0: read error not correctable (sector 1398118536 on sdd)我想这一个在接下来的几天内会死掉,但是我想重新添加它来处理一个降级的数组来执行一些备份(只有几个扇区被破坏了,我希望在它失败之前保存最大的数据)。
这是我的磁盘,按RAID顺序排列:
事实上,我不能使用以下命令将sdd重新添加到数组中:
# mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sdf1 --force --run
mdadm: failed to RUN_ARRAY /dev/md0: Input/output error
mdadm: Not enough devices to start the array.
# mdadm -D /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Tue Aug 24 14:20:39 2010
Raid Level : raid5
Used Dev Size : 1465039488 (1397.17 GiB 1500.20 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Oct 23 01:57:22 2011
State : active, FAILED, Not Started
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 128K
UUID : 01017848:84926c43:1751c931:a76e1cde (local to host tryphon)
Events : 0.131544
Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 0 0 1 removed
2 0 0 2 removed
3 8 81 3 active sync /dev/sdf1
4 8 49 - spare /dev/sdd1如您所见,sdd被识别为备用设备,而不是与RAID设备#1同步。
我不知道如何告诉mdadm sdd是RAID设备#1。
如果有人知道的话,那就太棒了!
谢谢。
PS:如果这有帮助,下面是mdadm磁盘检查的输出:
# mdadm -E /dev/sd[cdef]1
/dev/sdc1:
Magic : a92b4efc
Version : 0.90.00
UUID : 01017848:84926c43:1751c931:a76e1cde (local to host tryphon)
Creation Time : Tue Aug 24 14:20:39 2010
Raid Level : raid5
Used Dev Size : 1465039488 (1397.17 GiB 1500.20 GB)
Array Size : 4395118464 (4191.51 GiB 4500.60 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Update Time : Sun Oct 23 01:57:22 2011
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : dfeeeace - correct
Events : 131544
Layout : left-symmetric
Chunk Size : 128K
Number Major Minor RaidDevice State
this 0 8 33 0 active sync /dev/sdc1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 0 0 2 faulty removed
3 3 8 81 3 active sync /dev/sdf1
4 4 8 49 4 spare /dev/sdd1
/dev/sdd1:
Magic : a92b4efc
Version : 0.90.00
UUID : 01017848:84926c43:1751c931:a76e1cde (local to host tryphon)
Creation Time : Tue Aug 24 14:20:39 2010
Raid Level : raid5
Used Dev Size : 1465039488 (1397.17 GiB 1500.20 GB)
Array Size : 4395118464 (4191.51 GiB 4500.60 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Update Time : Sun Oct 23 01:57:22 2011
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : dfeeeae0 - correct
Events : 131544
Layout : left-symmetric
Chunk Size : 128K
Number Major Minor RaidDevice State
this 4 8 49 4 spare /dev/sdd1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 0 0 2 faulty removed
3 3 8 81 3 active sync /dev/sdf1
4 4 8 49 4 spare /dev/sdd1
/dev/sde1:
Magic : a92b4efc
Version : 0.90.00
UUID : 01017848:84926c43:1751c931:a76e1cde (local to host tryphon)
Creation Time : Tue Aug 24 14:20:39 2010
Raid Level : raid5
Used Dev Size : 1465039488 (1397.17 GiB 1500.20 GB)
Array Size : 4395118464 (4191.51 GiB 4500.60 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sat Oct 22 22:11:52 2011
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : dfeeb657 - correct
Events : 131534
Layout : left-symmetric
Chunk Size : 128K
Number Major Minor RaidDevice State
this 4 8 65 4 spare /dev/sde1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 0 0 2 faulty removed
3 3 8 81 3 active sync /dev/sdf1
4 4 8 65 4 spare /dev/sde1
/dev/sdf1:
Magic : a92b4efc
Version : 0.90.00
UUID : 01017848:84926c43:1751c931:a76e1cde (local to host tryphon)
Creation Time : Tue Aug 24 14:20:39 2010
Raid Level : raid5
Used Dev Size : 1465039488 (1397.17 GiB 1500.20 GB)
Array Size : 4395118464 (4191.51 GiB 4500.60 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Update Time : Sun Oct 23 01:57:22 2011
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : dfeeeb04 - correct
Events : 131544
Layout : left-symmetric
Chunk Size : 128K
Number Major Minor RaidDevice State
this 3 8 81 3 active sync /dev/sdf1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 0 0 2 faulty removed
3 3 8 81 3 active sync /dev/sdf1
4 4 8 49 4 spare /dev/sdd1发布于 2011-10-24 03:48:08
您首先需要的是sdD的off RAID副本。使用dd_rescue,例如..。恢复磁盘时,不要在RAID中使用此磁盘。
当您拥有这个副本时,使用它来启动数组w/o sdE - put而不是它的关键字missing。两个提示说明了如何做到这一点,即使直接使用--force的方法失败了:
1)您可以使用--assume-clean重新创建您的RAID。(不要忘记这个选项,因为只有超级块才会被更新,而不是奇偶)。
2)可以-A组装阵列。
在这两种情况下,您必须提供相同的配置选项(布局、块大小、磁盘顺序、…)。就像你破碎的突袭一样。事实上,我建议从-A-ssembling开始,因为它甚至不更新超级块,同时允许您访问数据。只有当你确定它是正确的装配,你可以使它持久的假设-干净的再创造。
当您运行带有3个磁盘的RAID时,只需放置您的sdE而不是缺少一个。
https://serverfault.com/questions/324155
复制相似问题