misc/176049: Periodic script to monitor mfi(4) arrays

Radar User radar at db.gsoft.com.au
Tue Feb 12 07:00:05 UTC 2013


>Number:         176049
>Category:       misc
>Synopsis:       Periodic script to monitor mfi(4) arrays
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 07:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Daniel O'Connor
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
Genesis Software
>Environment:
System: FreeBSD db.gsoft.com.au 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r224195: Tue Jul 19 17:45:03 CST 2011 radar at maarsy-acq3.gsoft.com.au:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
This is a simple script to show mfi(4) array status using mfiutil based on the gmirror one.

>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       410.status-mfi
#
echo x - 410.status-mfi
sed 's/^X//' >410.status-mfi << '3a7aa4f227ff0f30f691b713411da5bd'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# If there is a global system configuration file, suck it in.
X#
Xif [ -r /etc/defaults/periodic.conf ]
Xthen
X    . /etc/defaults/periodic.conf
X    source_periodic_confs
Xfi
X
Xcase "$daily_status_mfi_enable" in
X    [Yy][Ee][Ss])
X       echo
X       echo 'Checking status of mfi(4) devices:'
X
X       if mfiutil show volumes; then
X               components="$(mfiutil show volumes | fgrep DEGRADED)"
X               if [ "${components}" ]; then
X                       rc=3
X               else
X                       rc=0
X               fi
X       else
X               rc=2
X       fi
X       ;;
X
X    *)  rc=0;;
Xesac
X
Xexit $rc
3a7aa4f227ff0f30f691b713411da5bd
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list