Subject: misc/14094: RAID array status isn't reported in daily jobs
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/29/2001 04:40:03
>Number:         14094
>Category:       misc
>Synopsis:       RAID array status isn't reported in daily jobs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 28 21:35:00 PDT 2001
>Originator:     David Sainty
>Release:        20010901
Dynamic Technology Services and Products Ltd (NZ)
System: NetBSD 1.5X NetBSD 1.5X (TEQUILA) #1: Wed Sep 26 18:47:35 NZST 2001 i386
Architecture: i386
Machine: i386
	If a RAID array component has failed, but no-one is watching the
	console, it doesn't make a noise.  Unless you count the sound of the
	drive head scraping against the platter :)

	Included patch adds support to /etc/daily to do a brief health report
	on all arrays defined in /etc/raid*.conf, if any.

	Notice how quietly a RAID component can fail, wonder how long it would
	take to notice on a redundant array...

Patch defaults to enabled checks, because with no configuration files the
report is silent.  The report could likely be improved on, but it's a good
start - the important thing is to see the component list and whether any have

--- src/etc/daily.orig	Sat Sep  1 19:05:05 2001
+++ src/etc/daily	Sat Sep 29 15:05:03 2001
@@ -193,6 +193,19 @@
+if checkyesno check_raid; then
+	for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf; do
+		[ ! -f "$cfg" ] && continue
+		dev=${cfg##*/}
+		dev=${dev%%.conf}
+		echo ""
+		echo "RAID: Array status for ${dev}:"
+		# Strip out the component label dump...
+		raidctl -s "$dev" | awk -- '/^[A-Za-z]/ {show=1} /^Component label for/ {show=0} {if (show) print "  " $0; }'
+	done
 if checkyesno run_fsck; then
 	echo ""
 	echo "Checking filesystems:"
--- src/etc/defaults/daily.conf.orig	Sat Nov 11 15:36:06 2000
+++ src/etc/defaults/daily.conf	Sat Sep 29 15:04:42 2001
@@ -18,6 +18,7 @@