Currently mdcheck (when called with `--duration`) logs only the
beginning of the check, the pausing and the continuation but not the
completion.
So, log the completion, too, so that it can be determined how long the
raid check took.
2020-05-08T18:00:02+02:00 deadpool root: mdcheck start checking /dev/md0
2020-05-08T18:00:02+02:00 deadpool root: mdcheck start checking /dev/md1
2020-05-09T15:32:04+02:00 deadpool root: mdcheck finished checking /dev/md1
2020-05-09T17:38:04+02:00 deadpool root: mdcheck finished checking /dev/md0
Cc: linux-raid@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Use 'logger' to report when mdcheck starts, stops, or continues
the check on an array.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
The output of "mdadm --detail --export" isn't quoted properly so
fields that contain spaces can be a problem.
We only want the MD_UUID field, and it has a very well defined
format with no spaces.
So use 'grep' to limit the output to just that.
Signed-off-by: NeilBrown <neilb@suse.de>
This script allows arrays to be 'checked' for a limited amount
of time on a regular basis.
For example, running
mdcheck --duration 6hours
early every Sunday morning and
mdcheck --continue 6hours
ever other morning will check all arrays every week, but if that take
more than 6 hours, will won't run into the day, but will be continued
the next morning, and the next ... etc.
Signed-off-by: NeilBrown <neilb@suse.de>