r60 - mdadm/trunk/debian
madduck at users.alioth.debian.org
madduck at users.alioth.debian.org
Wed Aug 2 15:10:30 UTC 2006
Author: madduck
Date: 2006-08-02 15:10:29 +0000 (Wed, 02 Aug 2006)
New Revision: 60
Modified:
mdadm/trunk/debian/changelog
mdadm/trunk/debian/checkarray
Log:
checks, or when there are no redundant arrays present (closes: #380746).
* checkarray: now supports -s|--status switch to query parity check status
for given devices.
Modified: mdadm/trunk/debian/changelog
===================================================================
--- mdadm/trunk/debian/changelog 2006-08-02 13:34:18 UTC (rev 59)
+++ mdadm/trunk/debian/changelog 2006-08-02 15:10:29 UTC (rev 60)
@@ -12,10 +12,12 @@
device, but instead only insists that it exists, is a block device, and
recognised as an array by mdadm (mdadm --detail).
* checkarray: correctly recognise when the kernel is too old for parity
- checks, or when there are no redundant arrays present.
+ checks, or when there are no redundant arrays present (closes: #380746).
+ * checkarray: now supports -s|--status switch to query parity check status
+ for given devices.
* mkconf: now also outputs MAILADDR.
- -- martin f. krafft <madduck at debian.org> Wed, 2 Aug 2006 12:01:25 +0100
+ -- martin f. krafft <madduck at debian.org> Wed, 2 Aug 2006 16:07:03 +0100
mdadm (2.5.2-9) unstable; urgency=low
Modified: mdadm/trunk/debian/checkarray
===================================================================
--- mdadm/trunk/debian/checkarray 2006-08-02 13:34:18 UTC (rev 59)
+++ mdadm/trunk/debian/checkarray 2006-08-02 15:10:29 UTC (rev 60)
@@ -5,7 +5,7 @@
# Copyright © 2006 martin f. krafft <madduck at debian.org>
# distributed under the terms of the Artistic Licence.
#
-REVISION=2006.08.01.1621
+REVISION=2006.08.02.1604
PROGNAME=${0##*/}
@@ -42,11 +42,11 @@
echo
echo "The --all option overrides all arrays passed to the script."
echo
- echo "You can control the status of a check with /proc/mdstat ."
+ echo "You can also control the status of a check with /proc/mdstat ."
}
-SHORTOPTS=achVqQ
-LONGOPTS=all,cron,help,version,quiet,real-quiet
+SHORTOPTS=achVqQs
+LONGOPTS=all,cron,help,version,quiet,real-quiet,status
eval set -- $(getopt -o $SHORTOPTS -l $LONGOPTS -n $PROGNAME -- "$@")
@@ -54,11 +54,13 @@
cron=0
all=0
quiet=0
+status=0
for opt in $@; do
case "$opt" in
-a|--all) all=1;;
-c|--cron) cron=1;;
+ -s|--status) status=1;;
-h|--help) usage; exit 0;;
-q|--quiet) quiet=1;;
-Q|--real-quiet) quiet=2;;
@@ -91,6 +93,11 @@
exit 2
fi
+if [ ! -d /sys/block ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: /sys filesystem not available." >&2
+ exit 7
+fi
+
if [ -z "$(ls /sys/block/md* 2>/dev/null)" ]; then
[ $quiet -lt 2 ] && echo "$PROGNAME: W: no active RAID arrays found." >&2
[ $quiet -lt 2 ] && echo "$PROGNAME: W: (maybe uninstall the mdadm package?)" >&2
@@ -122,12 +129,19 @@
continue
fi
+ cur_status="$(cat $SYNC_ACTION_CTL)"
+
+ if [ $status -eq 1 ]; then
+ echo "$array: $cur_status"
+ continue
+ fi
+
if [ ! -w $SYNC_ACTION_CTL ]; then
[ $quiet -lt 2 ] && echo "$PROGNAME: E: $SYNC_ACTION_CTL not writeable." >&2
exit 4
fi
- if [ "$(cat $SYNC_ACTION_CTL)" != idle ]; then
+ if [ "$cur_status" != idle ]; then
[ $quiet -lt 2 ] && echo "$PROGNAME: W: array $array not idle, skipping..." >&2
continue
fi
More information about the pkg-mdadm-commits
mailing list