Package: mdadm
Version: 4.4-11
Severity: wishlist
the checkadm script refuses to check an array which has been created
"recently", which means it's
apparently not being checked when it's <14 days old.
could you perhaps make this check optional and add an option to the
command to skip this test?
that would for example be useful for everyone who is new to mdadm and
playing around with mdraid
and learning all the related stuff/commands.
furthermore, checkarray provides an easier to use interface to mdadm and
i really don't see the point,
why users getting patronized here and why an array should be at least 14
days old to be checked.
thank you
# 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