Use 'logger' to report when mdcheck starts, stops, or continues the check on an array. Signed-off-by: NeilBrown <neilb@xxxxxxxx> --- misc/mdcheck | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/mdcheck b/misc/mdcheck index 2c8f54d6e4cf..589d038eed9b 100644 --- a/misc/mdcheck +++ b/misc/mdcheck @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (C) 2014 Neil Brown <neilb@xxxxxxx> +# Copyright (C) 2014-2017 Neil Brown <neilb@xxxxxxx> # # # This program is free software; you can redistribute it and/or modify @@ -14,7 +14,7 @@ # GNU General Public License for more details. # # Author: Neil Brown -# Email: <neilb@xxxxxxx> +# Email: <neilb@xxxxxxxx> # This script should be run periodically to automatically # perform a 'check' on any md arrays. @@ -94,17 +94,20 @@ do if [ -z "$cont" ] then start=0 + logger -p daemon.info mdcheck start checking $dev elif [ -z "$MD_UUID" -o ! -f "$fl" ] then # Nothing to continue here continue else start=`cat "$fl"` + logger -p daemon.info mdcheck continue checking $dev from $start fi cnt=$[cnt+1] eval MD_${cnt}_fl=\$fl eval MD_${cnt}_sys=\$sys + eval MD_${cnt}_dev=\$dev echo $start > $fl echo $start > $sys/md/sync_min echo check > $sys/md/sync_action @@ -145,6 +148,7 @@ for i in `eval echo {1..$cnt}` do eval fl=\$MD_${i}_fl eval sys=\$MD_${i}_sys + eval dev=\$MD_${i}_dev if [ -z "$fl" ]; then continue; fi @@ -156,4 +160,5 @@ do fi echo idle > $sys/md/sync_action cat $sys/md/sync_min > $fl + logger -p daemon.info pause checking $dev at `cat $fl` done -- 2.14.0.rc0.dirty
Attachment:
signature.asc
Description: PGP signature