I have created a raid array say RAID5 or RAID10 with four drives. I wish to force resync of the same array, Please let me know the mdadm command for the same.

Also, in case of RAID1 (mirroring) what is being done as part of resync. Is it basically replication of same chunk of data in two drives? Linux is the OS used.



To resync an mdadm RAID-1 (which, as you suspect, is block-by-block checking one drive against the other, and replicating one to the other when they differ) you can do

echo "repair" > /sys/block/md0/md/sync_action

substituting md1, md2, etc. for md0 as appropriate.

Whilst I can't testify to it, this kernel patch from 2008 makes it pretty clear to me that this is also intended to work for RAID-5.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.