有时接触不良会导致一个磁盘与 raid5 阵列断开连接。现在我拿不回光盘了。错误弹出。什么是无效论点?
# mdadm /dev/md/2 --add /dev/sda5
mdadm: add new device failed for /dev/sda5 as 3: Invalid argument
# mdadm --brief /dev/md2
/dev/md2: 857.19GiB raid5 3 devices, 0 spares. Use mdadm --detail for more detail.
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md2 : active raid5 sdb5[4] sdc2[2]
898834048 blocks super 1.0 level 5, 64k chunk, algorithm 2 [3/2] [_UU]
md0 : active raid5 sdb3[1] sda6[4] sdc1[3]
976768512 blocks super 1.0 level 5, 128k chunk, algorithm 2 [3/3] [UUU]
bitmap: 2/4 pages [8KB], 65536KB chunk
unused devices: <none>
# mdadm --detail /dev/md2
/dev/md2:
Version : 1.0
Creation Time : Tue May 31 14:33:33 2016
Raid Level : raid5
Array Size : 898834048 (857.19 GiB 920.41 GB)
Used Dev Size : 449417024 (428.60 GiB 460.20 GB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Sat Oct 31 17:50:30 2020
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 64K
Consistency Policy : resync
Name : any:2
UUID : c4c80dbb:9b5cd068:fe33283e:63397104
Events : 2813
Number Major Minor RaidDevice State
- 0 0 0 removed
4 8 21 1 active sync /dev/sdb5
2 8 34 2 active sync /dev/sdc2
第二次尝试:
# dd if=/dev/zero of=/dev/sda5 bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes (210 MB, 200 MiB) copied, 2.12945 s, 98.5 MB/s
# mdadm /dev/md2 --add /dev/sda5
mdadm: add new device failed for /dev/sda5 as 3: Invalid argument
# dmesg
[ 8463.999268] md: sda5 does not have a valid v1.0 superblock, not importing!
[ 8463.999274] md: md_import_device returned -22
亚历山大·普罗科舍夫想到了这个建议 。阅读
我们了解到服务信息raid array v1.0 位于该部分的末尾。我们重置的不是开始,而是结束。我大致是这样做的:
我跳过 400Gb 并重置。下一次添加部分的尝试已经成功。