conf/87925: periodic daily_status_ata_raid with mounted fdescfs
Olli Hauer
ohauer at gmx.de
Mon Oct 24 07:30:24 PDT 2005
>Number: 87925
>Category: conf
>Synopsis: periodic daily_status_ata_raid with mounted fdescfs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 24 14:30:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Olli Hauer
>Release: 5.4-RELEASE-p8
>Organization:
>Environment:
5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #0: Sat Oct 22 18:42:00 CEST 2005
>Description:
strange output in daily status if fdescfs is mounted (for OpenBSD spamd)
and daily_status_ata_raid_enable="YES" in /etc/periodic.conf
>How-To-Repeat:
mount fdescfs
set daily_status_ata_raid_enable="YES" in /etc/periodic.conf
sh /etc/periodic/daily/405.status-ata-raid
it doesn't metter if some raid is installed or not watch the output
>Fix:
two solutions:
1. supress output from find in the daily/405 script (ugly)
--- 405.status-ata-raid.orig Sun May 8 09:05:11 2005
+++ 405.status-ata-raid Mon Oct 24 15:32:13 2005
@@ -17,7 +17,7 @@
echo 'Checking status of ATA raid partitions:'
rc=0
- for raid in `find /dev/ -name 'ar[0-9]*' -type c | egrep '[0-9]$' \
+ for raid in `find /dev/ -name 'ar[0-9]*' -type c 2> /dev/null | egrep '[0-9]$' \
| egrep -v 's[0-9]' | cut -d / -f 3`
do
status=`/sbin/atacontrol status $raid`
2. extend periodic.conf and the daily/405 script
periodic.conf extra parameter
daily_status_ata_raid_ar_list="" # list of numbers, sample: 0 exapnds to ar0
change 405 script to something like this
(if the extra parameter daily_status_ata_raid_ar_list is not set,
the script works like before)
#!/bin/sh
#
# $FreeBSD: src/etc/periodic/daily/405.status-ata-raid,v 1.1 2003/10/27 20:14:53 jesper Exp $
#
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
case "$daily_status_ata_raid_enable" in
[Yy][Ee][Ss])
echo
echo 'Checking status of ATA raid partitions:'
eval arlist=\$daily_status_ata_raid_ar_list
rc=0
if [ "X$arlist" != "X" ];
then
for raid in $arlist;
do
status=`/sbin/atacontrol status $raid`
echo $status
raid_rc=`echo $status | grep -v READY | wc -l`
[ $rc -eq 0 ] && [ $raid_rc -gt 0 ] && rc=3
done
else
for raid in `find /dev/ -name 'ar[0-9]*' -type c | egrep '[0-9]$' \
| egrep -v 's[0-9]' | cut -d / -f 3`
do
status=`/sbin/atacontrol status $raid`
echo $status
raid_rc=`echo $status | grep -v READY | wc -l`
[ $rc -eq 0 ] && [ $raid_rc -gt 0 ] && rc=3
done
fi
;;
*) rc=0;;
esac
exit $rc
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list