![无法将驱动器添加为阵列中的活动驱动器](https://linux22.com/image/689456/%E6%97%A0%E6%B3%95%E5%B0%86%E9%A9%B1%E5%8A%A8%E5%99%A8%E6%B7%BB%E5%8A%A0%E4%B8%BA%E9%98%B5%E5%88%97%E4%B8%AD%E7%9A%84%E6%B4%BB%E5%8A%A8%E9%A9%B1%E5%8A%A8%E5%99%A8.png)
我使用以下命令更换了出现故障的驱动器教程
首先我使用以下命令删除驱动器:
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>