Blame SOURCES/mdadm-raid-check-sysconfig

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