Scrubbing

From Linux Raid Wiki
Revision as of 17:43, 21 March 2011 by Natmaka (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A RAID array can suffer from sleeping bad blocks. i.e. blocks that you cannot read, but normally you never do (because they haven't been allocated to a file yet). When a drive fails, and you are recovering the data onto a spare, hitting that sleeper can kill your array. For this reason it is good to regularly (daily, or weekly, maybe monthly) read through the entire array making sure everything is OK. In 2.6.16 (with complete functionality in 2.6.17) you will be able to trigger a background read-test of the whole array:

  echo check > /sys/block/mdX/md/sync_action

If you were to create an array with --assume-clean, then whenever you run this it will report lots of errors, though you can fix them with

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

If you are going to be doing that (and I would recommend it) then you may as well allow the initial sync, especially as you can quite happily ignore the fact that it is happening.

Personal tools