Blame SOURCES/mdadm-raid-check-sysconfig

2b9168
#!/bin/bash
2b9168
#
2b9168
# Configuration file for /etc/cron.weekly/raid-check
2b9168
#
2b9168
# options:
2b9168
#	ENABLED - must be yes in order for the raid check to proceed
2b9168
#	CHECK - can be either check or repair depending on the type of
2b9168
#		operation the user desires.  A check operation will scan
2b9168
#		the drives looking for bad sectors and automatically
2b9168
#		repairing only bad sectors.  If it finds good sectors that
2b9168
#		contain bad data (meaning that the data in a sector does
2b9168
#		not agree with what the data from another disk indicates
2b9168
#		the data should be, for example the parity block + the other
2b9168
#		data blocks would cause us to think that this data block
2b9168
#		is incorrect), then it does nothing but increments the
2b9168
#		counter in the file /sys/block/$dev/md/mismatch_count.
2b9168
#		This allows the sysadmin to inspect the data in the sector
2b9168
#		and the data that would be produced by rebuilding the
2b9168
#		sector from redundant information and pick the correct
2b9168
#		data to keep.  The repair option does the same thing, but
2b9168
#		when it encounters a mismatch in the data, it automatically
2b9168
#		updates the data to be consistent.  However, since we really
2b9168
#		don't know whether it's the parity or the data block that's
2b9168
#		correct (or which data block in the case of raid1), it's
2b9168
#		luck of the draw whether or not the user gets the right
2b9168
#		data instead of the bad data.  This option is the default
2b9168
#		option for devices not listed in either CHECK_DEVS or
2b9168
#		REPAIR_DEVS.
2b9168
#	CHECK_DEVS - a space delimited list of devs that the user specifically
2b9168
#		wants to run a check operation on.
2b9168
#	REPAIR_DEVS - a space delimited list of devs that the user
2b9168
#		specifically wants to run a repair on.
2b9168
#	SKIP_DEVS - a space delimited list of devs that should be skipped
2b9168
#	NICE - Change the raid check CPU and IO priority in order to make
2b9168
#		the system more responsive during lengthy checks.  Valid
2b9168
#		values are high, normal, low, idle.
2b9168
#	MAXCONCURENT - Limit the number of devices to be checked at a time.
2b9168
#		By default all devices will be checked at the same time.
2b9168
#
2b9168
# Note: the raid-check script intentionaly runs last in the cron.weekly
2b9168
# sequence.  This is so we can wait for all the resync operations to complete
2b9168
# and then check the mismatch_count on each array without unduly delaying
2b9168
# other weekly cron jobs.  If any arrays have a non-0 mismatch_count after
2b9168
# the check completes, we echo a warning to stdout which will then me emailed
2b9168
# to the admin as long as mails from cron jobs have not been redirected to
2b9168
# /dev/null.  We do not wait for repair operations to complete as the
2b9168
# md stack will correct any mismatch_cnts automatically.
2b9168
#
2b9168
# Note2: you can not use symbolic names for the raid devices, such as you
2b9168
# /dev/md/root.  The names used in this file must match the names seen in
2b9168
# /proc/mdstat and in /sys/block.
2b9168
2b9168
ENABLED=yes
2b9168
CHECK=check
2b9168
NICE=low
2b9168
# To check devs /dev/md0 and /dev/md3, use "md0 md3"
2b9168
CHECK_DEVS=""
2b9168
REPAIR_DEVS=""
2b9168
SKIP_DEVS=""
2b9168
MAXCONCURRENT=