One minute
Replace A Failed Disk In A MD Raid (RAID1)
This post will cover how to replace a failed disk in a MD RAID1.
Mark the disk failed
mdadm --manage /dev/md0 --fail /dev/sdb1
Verify that this disk has been marked as failed.
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[2](F)
976773168 blocks [2/1] [U_]
Remove the disk from the RAID
mdadm --manage /dev/md0 --remove /dev/sdb1
Copy the partition
sfdisk -d /dev/sda | sfdisk /dev/sdb
Add the disk to the RAID
mdadm --manage /dev/md0 --add /dev/sdb1
Verify!
watch cat /proc/mdstat
90 Words
2022-06-26 23:19
Read other posts