我有一台机器,SATA 卡出现故障,导致我丢失了 RAID 阵列。我在外部测试了驱动器,它们状况良好。我已将驱动器移至新机器(具有足够的板载 SATA 端口),并尝试恢复阵列,但遇到了问题。这是一个带有 4 个驱动器的 RAID 5 阵列。似乎其中一个驱动器不在阵列中。我正在运行 ubuntu 14.04,当前的 mdadm.conf 仍然是默认值。我有旧的 mdadm.conf 信息。我真的很想保留驱动器上的数据。有什么建议吗?
以下是 mdadm 所说的内容:
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : inactive sdd1[2] sde1[4] sdb1[5]
5860537608 blocks super 1.2
-
sudo mdadm --examine /dev/sd[bcde]1
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x2
Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
Name : mediaserver:0
Creation Time : Tue Aug 6 08:38:10 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Recovery Offset : 1799197544 sectors
Unused Space : before=1968 sectors, after=1200 sectors
State : clean
Device UUID : 968168e5:6c695c7b:66a78ba1:9bccdc80
Update Time : Sun Sep 29 16:09:54 2013
Checksum : dd82d9a - correct
Events : 47568
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 2
Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
Name : mediaserver:0
Creation Time : Tue Aug 6 08:38:10 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=1200 sectors
State : clean
Device UUID : 1da9199e:cc6fc424:128e502c:881d890a
Update Time : Sun Sep 29 14:46:26 2013
Checksum : 1923ec18 - correct
Events : 47565
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 0
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
Name : mediaserver:0
Creation Time : Tue Aug 6 08:38:10 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=1200 sectors
State : clean
Device UUID : 3688a662:e042319b:017fe47f:a73d04b2
Update Time : Sun Sep 29 16:09:54 2013
Checksum : 4f2dc2e7 - correct
Events : 47568
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 1
Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sde1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
Name : mediaserver:0
Creation Time : Tue Aug 6 08:38:10 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=1200 sectors
State : clean
Device UUID : 173cc321:8c8b416a:635388f7:3dd0bb3e
Update Time : Sun Sep 29 16:09:54 2013
Checksum : e1b6266d - correct
Events : 47568
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 3
Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
阵列停止
sudo mdadm --assemble --scan -v
mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/sde
mdadm: no RAID superblock on /dev/sdd
mdadm: no RAID superblock on /dev/sdc
mdadm: no RAID superblock on /dev/sdb
mdadm: no RAID superblock on /dev/sda5
mdadm: no RAID superblock on /dev/sda2
mdadm: no RAID superblock on /dev/sda1
mdadm: no RAID superblock on /dev/sda
mdadm: /dev/sde1 is identified as a member of /dev/md/mediaserver:0, slot 3.
mdadm: /dev/sdd1 is identified as a member of /dev/md/mediaserver:0, slot 1.
mdadm: /dev/sdc1 is identified as a member of /dev/md/mediaserver:0, slot 0.
mdadm: /dev/sdb1 is identified as a member of /dev/md/mediaserver:0, slot 2.
mdadm: added /dev/sdc1 to /dev/md/mediaserver:0 as 0 (possibly out of date)
mdadm: added /dev/sdb1 to /dev/md/mediaserver:0 as 2
mdadm: added /dev/sde1 to /dev/md/mediaserver:0 as 3
mdadm: added /dev/sdd1 to /dev/md/mediaserver:0 as 1
mdadm: /dev/md/mediaserver:0 assembled from 2 drives and 1 rebuilding - not enough to start the array.
mdadm: looking for devices for further assembly
mdadm: No arrays found in config file or automatically
-
sudo mdadm --detail --scan
ARRAY /dev/md127 metadata=1.2 spares=1 name=mediaserver:0 UUID=ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
根据评论的建议...我尝试了这个并发现了一个新的错误。
sudo mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
mdadm: /dev/md127 assembled from 2 drives and 1 rebuilding - not enough to start the array.
在所有驱动器上运行了 smartctl 并且通过了
答案1
看起来 sdc1 未组装。我也在使用 mdadm,它使用扫描操作时工作不可靠 - 我总是手动组装它们。因此请尝试以下操作:
确保您的阵列已停止:
mdadm --stop /dev/md127
然后使用以下行重新组装您的数组:
mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
现在检查你的状态:
mdadm --detail /dev/md127
您的阵列很可能会被重新同步。