我使用以下命令更换了出现故障的驱动器教程
首先我使用以下命令删除驱动器:
mdadm --manage /dev/md0 --fail /dev/sdc1
mdadm --manage /dev/md0 --remove /dev/sdc1
添加并格式化新驱动器
sfdisk -d /dev/sda | sfdisk /dev/sdc
mdadm --manage /dev/md0 --add /dev/sdc1
该阵列开始使用新驱动器重建,但现在卡在spare rebuilding /dev/sdc1
如何才能使阵列中的设备再次处于活动状态?
root@openmediavault:~# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Fri Nov 20 00:28:55 2015
Raid Level : raid5
Array Size : 3905767424 (3724.83 GiB 3999.51 GB)
Used Dev Size : 1952883712 (1862.42 GiB 1999.75 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Tue Sep 6 19:54:58 2016
State : active, degraded
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 512K
Name : manfred:0
UUID : 051c3493:cd0e06a3:6b8cbbcb:c89c797c
Events : 16997044
Number Major Minor RaidDevice State
4 8 33 0 spare rebuilding /dev/sdc1
1 8 1 1 active sync /dev/sda1
3 8 17 2 active sync /dev/sdb1
root@openmediavault:~# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdc1[4] sdb1[3] sda1[1]
3905767424 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [_UU]
resync=DELAYED
bitmap: 0/15 pages [0KB], 65536KB chunk
unused devices: <none>