FS#22563 - [mdadm] add a cronjob to scrub data on mdadm arrays

Attached to Project: Arch Linux
Opened by silvik (silvik) - Sunday, 23 January 2011, 03:38 GMT
Last edited by Allan McRae (Allan) - Friday, 16 November 2012, 11:34 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

From http://en.gentoo-wiki.com/wiki/RAID/Software#Data_Scrubbing:
"Especially if you run a RAID5 array, trigger an active bad block check on a regular basis, or there is a high chance of hidden bad blocks making your RAID unusable during reconstruction."

Several other distros include a monthly cron job that scrubs mdadm arrays and reports via email if mismatches are found, to prevent silent corruption of data (bad blocks etc) like Debian's checkarray or RedHat's 99-raid-check. We could 'borrow' that script from one of these distos and it will probably work (not much work needed).

Some users might not like the fact that this check takes time and the disks will be busy, so it could be left disabled and the user will be notified after package installation to enable the job (chmod the script). A side benefit would be that users will find out about a less known (but IMHO very useful) mdadm feature.



Additional info:
* package version(s) mdadm 3.1.4-1
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 16 November 2012, 11:34 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Arch ships vanilla packages, additional configuration to be done by the user.
Comment by Tobias Powalowski (tpowa) - Friday, 25 March 2011, 08:12 GMT
Could you please link to the other distros scripts?
I don't like adding stuff that is only usable for RAID5.
Comment by Brendan (watricky) - Thursday, 05 July 2012, 21:21 GMT
The CentOS 6.2 version is packaged with mdadm:
To extract you'll need to install rpmextract (I think its in [extra])
Example Centos 6.2 package: http://ftp.wa.co.za/pub/centos/6.2/os/x86_64/Packages/mdadm-3.2.2-9.el6.x86_64.rpm (link likely to be outdated as some point)
rpmextract.sh mdadm<tab>

I'm not sure how to figure out where/who the actual "upstream" source for the script is.
Comment by Brendan (watricky) - Thursday, 05 July 2012, 21:37 GMT
With regards to the usability/relevance, the scrub is usable for all RAID levels, just that it will be more or less relevant for each:
RAID6 - Good but mitigated mostly by RAID6's "double parity"
RAID5 - A data/life saver! It will find a bad disk sooner rather than (worst-case scenario) while you're in a rebuild/reshape (which results in lost data)
RAID10 - similar to RAID5. I'd rather scrub than not.
RAID1 - a good idea
RAID0 - completely irrelevant, more likely to cause headaches than save your skin. Much better to upgrade to RAID10/RAID1 or rely on early warning via S.M.A.R.T. extra/smartmontools)

Loading...