summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-05-25 21:12:38 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2012-05-25 21:12:38 +0400
commitd8331bf5a9877522e320a9bbf99eaae0cc7153e9 (patch)
tree50a63d6a855e571e80dd202f904db9e1085e4ad7 /debian
parent8fbf562ad451080db4fc493ca5807c3f35afd2e1 (diff)
do not check recently created arrays (#624273)
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/checkarray15
2 files changed, 17 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index f6f4a10c..7359f9b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ mdadm (3.2.5-1) UNRELEASED; urgency=low
device to an array, introduced in 3.2.4, plus other minor fixes
(Closes: #673104, #673344)
* new patch: sha1-includes.diff to fix #include mess in new sha1.h
+ * added a check into debian/checkarray to skip checking arrays created
+ less than 2 weeks ago (Closes: #624273)
-- Michael Tokarev <mjt@tls.msk.ru> Fri, 25 May 2012 20:23:52 +0400
diff --git a/debian/checkarray b/debian/checkarray
index 2043d8cd..a3e5a6be 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -175,6 +175,21 @@ for array in $arrays; do
continue
fi
+ # check if the array created recently and skip test if it is
+ created=$(mdadm --detail /dev/$array 2>/dev/null |
+ sed -n 's/.*Creation Time *://p' )
+ if [ -n "$created" ]; then
+ created=$(date +%s -d "$created" 2>/dev/null)
+ fi
+ if [ -n "$created" ]; then
+ now=$(date +%s)
+ if [ "$created" -lt "$now" -a \
+ "$created" -gt "$(($now - 14 * 24 * 60 * 60))" ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: I: array $array created recently, skipping..." >&2
+ continue
+ fi
+ fi
+
# queue request for the array. The kernel will make sure that these requests
# are properly queued so as to not kill one of the array.
echo $action > $MDBASE/sync_action