#!/bin/bash
for dev in `grep "^md.*: active" /proc/mdstat | cut -f 1 -d ' '`; do
echo "check" > /sys/block/$dev/md/sync_action
done