使用 mdadm 创建的 RAID1 阵列;发生电源故障时正在重建阵列。回来后,阵列似乎已经死了。
# cat /proc/mdstat
Personalities : [raid1]
md0 : inactive sdb1[2](S) sda1[3](S)
15627751424 blocks super 1.2
# mdadm --stop /dev/md0
mdadm: stopped /dev/md0
# mdadm --assemble /dev/md1 /dev/sda1 /dev/sdb1
mdadm: /dev/md1 assembled from 0 drives and 1 rebuilding - not enough to start the array.
我不知道为什么它说 0 个驱动器 - 我预计 1 个重建,但另一个驱动器应该没问题。我真的不想意外地做任何破坏性的事情——我应该怎么做才能让阵列恢复到可以在其上运行 fsck 的状态?
/dev/sda1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x3
Array UUID : c4ea2289:c63bc8ce:e6fe5806:5bebe020
Name : ******:0 (local to host ******)
Creation Time : Thu Aug 20 20:48:53 2020
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 15627718656 (7451.88 GiB 8001.39 GB)
Array Size : 7813859328 (7451.88 GiB 8001.39 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Recovery Offset : 7331083264 sectors
Unused Space : before=264112 sectors, after=0 sectors
State : clean
Device UUID : ae984a41:f3e421f4:f10e1fac:d7955178
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Oct 31 17:13:53 2020
Bad Block Log : 512 entries available at offset 40 sectors
Checksum : 4be47968 - correct
Events : 1079809
Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : c4ea2289:c63bc8ce:e6fe5806:5bebe020
Name : ******:0 (local to host ******)
Creation Time : Thu Aug 20 20:48:53 2020
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 15627784192 (7451.91 GiB 8001.43 GB)
Array Size : 7813859328 (7451.88 GiB 8001.39 GB)
Used Dev Size : 15627718656 (7451.88 GiB 8001.39 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Unused Space : before=264112 sectors, after=65536 sectors
State : active
Device UUID : 0abf70e2:7e0e43ca:a22548a2:ef87e9c0
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Oct 31 17:13:31 2020
Bad Block Log : 512 entries available at offset 40 sectors
Checksum : 4cf65df4 - correct
Events : 1079799
Device Role : Active device 1
Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
查看带有 xxd 的驱动器,两者似乎仍然包含数据。这是我自己可以合理管理的事情,还是该找数据恢复公司了?
编辑:Wazoox 的回答有效。
# mdadm --assemble --scan --force
mdadm: forcing event count in /dev/sda1(1) from 1079799 upto 1079809
mdadm: /dev/md0 has been started with 1 drive (out of 2) and 1 rebuilding.
# cat /proc/mdstat
Personalities : [raid1]
md0 : active (auto-read-only) raid1 sdb1[3] sda1[2]
7813859328 blocks super 1.2 [2/1] [_U]
bitmap: 59/59 pages [236KB], 65536KB chunk