我的软件raid6无法挂载。看起来两个驱动器同时发生故障,因为 /proc/mdstat 只列出了四个:
Personalities : [raid6] [raid5] [raid4]
md0 : inactive sde1[8] sdc1[7] sdd1[9] sdb1[5]
7813424199 blocks super 1.2
unused devices: <none>
同样sudo mdadm --detail /dev/md0
,有 4 个设备处于活动状态:
/dev/md0:
Version : 1.2
Creation Time : Wed Dec 3 16:26:25 2014
Raid Level : raid6
Used Dev Size : 1953280064 (1862.79 GiB 2000.16 GB)
Raid Devices : 6
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Fri Dec 31 18:17:20 2021
State : active, FAILED, Not Started
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 64K
Consistency Policy : unknown
Name : prime-mover:0 (local to host prime-mover)
UUID : 8663f215:81c2e5d5:acb03ac6:4ebdc19c
Events : 74090
Number Major Minor RaidDevice State
- 0 0 0 removed
- 0 0 1 removed
- 0 0 2 removed
- 0 0 3 removed
- 0 0 4 removed
- 0 0 5 removed
- 8 65 0 sync /dev/sde1
- 8 49 1 sync /dev/sdd1
- 8 33 4 sync /dev/sdc1
- 8 17 5 sync /dev/sdb1
安装失败:
$ sudo mount /dev/md0
mount: /mnt/well: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
但尝试添加新驱动器也是如此,我以与其他所有驱动器相同的方式设置该驱动器:
$ sudo mdadm --manage /dev/md0 --add /dev/sdf1
mdadm: add new device failed for /dev/sdf1 as 6: Invalid argument
(从“as 6”我猜测它试图将其添加为设备 6,而不是替换丢失的设备 2 和 3,出于某种原因?)
所有四个现有驱动器看起来都很干净,但报告了错误的校验和:sudo mdadm --examine /dev/sdb1
作为一个代表性示例,给出
[...]
State : clean
[...]
Update Time : Fri Dec 31 18:17:20 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 1935402d - expected 1935402c
Events : 74090
(所有四个驱动器上的事件数量相同,因此这不是问题。)
以下是相关部分dmesg
:
[ 33.337211] raid6: avx2x4 gen() 41239 MB/s
[ 33.393878] raid6: avx2x4 xor() 14484 MB/s
[ 33.450549] raid6: avx2x2 gen() 45821 MB/s
[ 33.507210] raid6: avx2x2 xor() 27873 MB/s
[ 33.563876] raid6: avx2x1 gen() 40386 MB/s
[ 33.620543] raid6: avx2x1 xor() 23907 MB/s
[ 33.677210] raid6: sse2x4 gen() 23743 MB/s
[ 33.733876] raid6: sse2x4 xor() 11989 MB/s
[ 33.790544] raid6: sse2x2 gen() 23125 MB/s
[ 33.847209] raid6: sse2x2 xor() 14725 MB/s
[ 33.903876] raid6: sse2x1 gen() 18738 MB/s
[ 33.960471] raid6: sse2x1 xor() 12188 MB/s
[ 33.960471] raid6: using algorithm avx2x2 gen() 45821 MB/s
[ 33.960471] raid6: .... xor() 27873 MB/s, rmw enabled
[ 33.960472] raid6: using avx2x2 recovery algorithm
[ 33.961777] xor: automatically using best checksumming function avx
[ 33.974316] md/raid:md0: device sde1 operational as raid disk 0
[ 33.974317] md/raid:md0: device sdc1 operational as raid disk 4
[ 33.974317] md/raid:md0: device sdd1 operational as raid disk 1
[ 33.974318] md/raid:md0: device sdb1 operational as raid disk 5
[ 33.974858] md/raid:md0: raid level 6 active with 4 out of 6 devices, algorithm 2
[ 33.974934] md0: invalid bitmap file superblock: bad magic
[ 33.974936] md0: failed to create bitmap (-22)
是什么阻止它安装或添加新驱动器?问题是校验和错误吗?这里有办法恢复吗?