How to force RAID resync on Linux (mdadm RAID)

To force a resync in mdadm, you can trigger a rebuild of your RAID array. Follow these steps carefully, as they might disrupt your data if not done properly:

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

Replace md0 with the name of your RAID array (cat /proc/mdstat to show all RAID arrays)

To watch the progress:

watch cat /proc/mdstat