Alice Ferrazzi: update to current master and move CHECK_SPLIT
alice ferrazzi
aliceinwire-guest at alioth.debian.org
Wed Sep 8 11:35:23 UTC 2010
Module: mdadm
Branch: aliceferrazzi
Commit: fc72a567aaa0cee3f7b75fc367ed9feb38f8e9ec
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=fc72a567aaa0cee3f7b75fc367ed9feb38f8e9ec
Author: Alice Ferrazzi <aliceinwire at gnumerica.org>
Date: Wed Sep 8 13:31:06 2010 +0200
update to current master and move CHECK_SPLIT
---
debian/checkarray | 8 ++++----
debian/mdadm.postinst | 9 +++++++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/debian/checkarray b/debian/checkarray
index 0abb3a4..4a6cb93 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -113,8 +113,7 @@ wait_completed() {
while [ "$(cat /sys/block/$1/md/sync_completed)" != "none" ] ; do
# save this if the check has been cancelled
last_checked=$(cut -d ' ' -f1 /sys/block/$1/md/sync_completed)
- # this must be done after the previous check otherwise -ne might complain that the first argument is not a number
- if [ "$last_checked" -ne "$2" ] ; then
+ if [ "$last_checked" != "$2" ] ; then
sleep 3
# inotifywait might be used here instead of sleep with something like
# inotifywait -q -e modify /sys/block/$1/md/sync_completed | :
@@ -202,7 +201,6 @@ is_true()
}
DEBIANCONFIG=/etc/default/mdadm
-CHECK_SPLIT=28 #TODO remove from this file and put it in /etc/default/mdadm, it must be between 1 and 28, modify cron too
[ -r $DEBIANCONFIG ] && . $DEBIANCONFIG
if [ $cron = 1 ] && ! is_true ${AUTOCHECK:-false}; then
[ $quiet -lt 1 ] && echo "$PROGNAME: I: disabled in $DEBIANCONFIG ." >&2
@@ -363,7 +361,9 @@ for array in $arrays; do
wait=$((wait - 1))
resync_pid=$(ps -ef | awk -v dev=$array 'BEGIN { pattern = "^\\[" dev "_resync]$" } $8 ~ pattern { print $2 }')
if [ -n "$resync_pid" ]; then
- echo "$PROGNAME: I: selecting $ionice I/O schedulung class for resync of $array." >&2
+ if [ $cron != 1 ]; then
+ echo "$PROGNAME: I: selecting $ionice I/O scheduling class for resync of $array." >&2
+ fi
ionice -p "$resync_pid" $arg
break
fi
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index 56d3cb3..9ca16e0 100644
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -129,6 +129,15 @@ VERBOSE=${VERBOSE:-false}
# MAIL_TO:
# this variable is now managed in /etc/mdadm/mdadm.conf (MAILADDR).
# Please see mdadm.conf(5).
+#it must be between 1 and 28, modify cron too
+
+# CHECK_SPLIT
+# control if the monthly check should be splitted in more small checks
+# it must be between 1 and 28, with 1 you get no split, so the
+# monthy check will be monolithic, with 28 1/28 of the array will
+# be checked every day
+CHECK_SPLIT=${CHECK_SPLIT-28}
+
_eof
db_stop
More information about the pkg-mdadm-commits
mailing list