tag 624273 +patch
thanks

A simple patch attached.
>From 25f0fd586192ec2567344a5beceb16d2f8ef7959 Mon Sep 17 00:00:00 2001
From: Sergey B Kirpichev <skirpic...@gmail.com>
Date: Sun, 22 Jan 2012 18:38:30 +0400
Subject: [PATCH] Cancel check for recently created arrays

---
 debian/checkarray |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/debian/checkarray b/debian/checkarray
index 2043d8c..929109c 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -175,6 +175,13 @@ for array in $arrays; do
         continue
       fi
 
+      creation_date="$(mdadm --detail /dev/$array|sed -n 's/.*Creation Time : \(.*\)/\1/p')"
+      if [ $(date "+%s" -d "$creation_date + 2 weeks") -gt $(date "+%s") ]
+      then
+        [ $quiet -lt 1 ] && echo "$PROGNAME: I: check for array $array canceled due to recent creation date" >&2
+        continue
+      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
-- 
1.7.2.5

Reply via email to