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

2
  • May I ask for cat /proc/mdadm and mdadm --detail /dev/mdX? What distribution and version do you have there? Jul 8, 2016 at 18:25
  • You might find some interesting information in the answers to this related, but not identical, question.
    – JasonAzze
    Jul 8, 2016 at 18:44

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .