How do I resync a "dirty" software raid1?
I have a software raid 1 array here, consiting of two drives:
sudo mdadm --create /dev/md0 -a -l 1 -n 2 /dev/sdb /dev/sdc To test it I pulled out one disk, made changes to the ramining disk and then plugged back in the other drive. I ended up with: Code:
md0 : active raid1 sdb[0] sdc[2](F) For further description of my problem and how I ran into it, please read: http://www.linuxquestions.org/questi...59#post2769659 |
you need to remove the failed/missing device with mdadm first and the re-add it to start the rebuild/sync.
Code:
mdadm --manage /dev/md0 --remove /dev/sdc Code:
mdadm --manage /dev/md0 --fail /dev/sdc |
Thanks a LOT!
That did it. Actually I got a Code:
hot remove failed for /dev/sdc No such device or address As it seems re-booting/waiting during the process made mdadm remove the drive completely from the array during the process. So, when I tried to "--remove" it, it was in fact already gone. So Code:
sudo mdadm /dev/md0 -a /dev/sdc And when resync was slow (7000min! on a non-production machine) I did "sudo -s -H" to circumvent the ubuntu “permission denied” problem and then "echo 50000 >/proc/sys/dev/raid/speed_limit_min" - and instantly I was down to 240min. Now my last question: Should I worry about fdisk giving Code:
sudo fdisk -l /dev/sdb |
All times are GMT -5. The time now is 04:49 PM. |