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

References:
http://en.gentoo-wiki.com/wiki/RAID/Software#Data_Scrubbing

An overly dramatic article on this issue:
http://www.zdnet.com/blog/storage/why-raid-5-stops-working-in-2009/162

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.

    ReplyDelete