RAID logical volumes that are created via LVM are now capable of performing scrubbing operations. Scrubbing operations are user-initiated checks to ensure that the RAID volume is consistent. For example, a scrubbing "check" operation on a RAID1 logical volume would determine if there are any sectors in the mirror set that are not the same.
There are two scrubbing operations that can be performed: "check" and "repair". The "check" operation will examine the logical volume for any discrepancies, but will not correct them. The "repair" operation will correct any discrepancies found.
Once a "check" operation is performed, the user can tell if any mismatches were found by examining the 'lv_attr' field in the output of an 'lvs' command. The user can also find out the number of discrepancies found by including the 'raid_mismatch_count' field in the 'lvs' output. Here are a couple examples:
# To perform a "check" on a RAID logical volume, do:
~> lvchange --syncaction check vg/lv
# To perform a "repair" on a RAID logical volume, do:
~> lvchange --syncaction repair vg/lv
# To determine the mismatch count after a "check", do:
~> lvs -o +raid_mismatch_count vg/lv