Wednesday, December 29, 2010

MDADM RAID5 Data Scrubbing

If you have a RAID5 array made up of large disks the odds are good that you will experience an unreadable block while rebuilding from a failed drive. To try and find these blocks preemptively, set up regular data scrubbing using cron.

Something along the lines of:
# crontab -e
        0 4 * * 3 /bin/echo check > /sys/block/md0/md/sync_action


An overly dramatic article on this issue:

1 comment:

  1. Note that Debian based systems such as Ubuntu already schedule this in /etc/cron.d/mdadm via a script they've written, and it's scheduled to be done monthly. If you have cron and anacron on such a system, and your mdadm email address set, you're set.