3

I have RAID6 on 24 drives. The raid was setup with mdadm, so it is a software raid. One of the drives died and the server freezed due to that, so it had to be rebooted using Power Cycle (power off + power on).

When the server booted, it started the RAID array with 23 devices, and it started resync operation. If I understand it correctly, this resync just reads data on all drives and checks if everything is all right, no writes are performed. I can confirm this by iostat -m 1 which shows only reading.

So I've replaced the faulty drive by a new one, and I would like to start REBUILD, so it actually writes data to the newly added device. I have issued the following command:

mdadm --add /dev/md0 /dev/sdc # this adds sdc to the array

It went smoothly, however the raid is still resyncing, not rebuilding. The drive is reported as spare (S) in /proc/mdstat, and it probably waits for the resync to finish in order to start rebuild.

I have to say that I don't care about resync, I need it stopped immediately and start rebuild immediately. Is there any way to do that? Thank you

Tomas M
  • 151
  • 1
  • 4
  • May I ask for `cat /proc/mdadm` and `mdadm --detail /dev/mdX`? What distribution and version do you have there? – Michal Sokolowski Jul 08 '16 at 18:25
  • You might find some interesting information in the answers to this related, but not identical, [question](http://serverfault.com/questions/216508/how-to-interrupt-software-raid-resync). – JasonAzze Jul 08 '16 at 18:44

1 Answers1

2

I was not able to wait for a solution, anything I found online didn't work while the array was active. So I stopped the array

mdadm --stop /dev/md0

and then started it again

mdadm --assemble /dev/md0 /dev/sd{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}

This effectively stopped the resync and started rebuild.

Tomas M
  • 151
  • 1
  • 4