From owner-svn-src-head@freebsd.org Fri Apr 14 22:59:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5975AD3DBC8; Fri, 14 Apr 2017 22:59:16 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E265E05; Fri, 14 Apr 2017 22:59:16 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EMxFCq083237; Fri, 14 Apr 2017 22:59:15 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EMxEAa083233; Fri, 14 Apr 2017 22:59:14 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201704142259.v3EMxEAa083233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 14 Apr 2017 22:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316945 - in head: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 22:59:16 -0000 Author: asomers Date: Fri Apr 14 22:59:14 2017 New Revision: 316945 URL: https://svnweb.freebsd.org/changeset/base/316945 Log: Add 410.status-mfi, a periodic script for mfi(4) arrays PR: 176049 Submitted by: doconnor@gsoft.com.au Reviewed by: scottl, Larry Rosenman MFC after: 3 weeks Relnotes: yes Added: head/etc/periodic/daily/410.status-mfi (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Fri Apr 14 22:02:08 2017 (r316944) +++ head/etc/defaults/periodic.conf Fri Apr 14 22:59:14 2017 (r316945) @@ -112,6 +112,9 @@ daily_status_gstripe_enable="NO" # Che # 409.status-gconcat daily_status_gconcat_enable="NO" # Check gconcat(8) +# 410.status-mfi +daily_status_mfi_enable="NO" # Check mfiutil(8) + # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok Added: head/etc/periodic/daily/410.status-mfi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/410.status-mfi Fri Apr 14 22:59:14 2017 (r316945) @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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_mfi_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of mfi(4) devices:' + + if mfiutil show volumes; then + if mfiutil show volumes | grep -q DEGRADED; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Fri Apr 14 22:02:08 2017 (r316944) +++ head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 (r316945) @@ -13,6 +13,7 @@ FILES= 100.clean-disks \ 400.status-disks \ 401.status-graid \ 406.status-gmirror \ + 410.status-mfi \ 407.status-graid3 \ 408.status-gstripe \ 409.status-gconcat \ Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Fri Apr 14 22:02:08 2017 (r316944) +++ head/share/man/man5/periodic.conf.5 Fri Apr 14 22:59:14 2017 (r316945) @@ -399,6 +399,15 @@ if you want to run on your .Xr gconcat 8 devices. +.It Va daily_status_mfi_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Nm mfiutil Cm status +on your +.Xr mfi 4 +devices. .It Va daily_status_network_enable .Pq Vt bool Set to