Blame SOURCES/mdadm-raid-check-sysconfig

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