diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-02-23 00:16:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-02-23 00:16:51 +0000 |
commit | 5f97b91b43f66d8716cf2163ab428571669fe106 (patch) | |
tree | 379386664828ee0b09ad229f2e62eb37eb100f75 /sys-fs | |
parent | stable on ia64 (diff) | |
download | gentoo-2-5f97b91b43f66d8716cf2163ab428571669fe106.tar.gz gentoo-2-5f97b91b43f66d8716cf2163ab428571669fe106.tar.bz2 gentoo-2-5f97b91b43f66d8716cf2163ab428571669fe106.zip |
Add a simple cron job for scanning for failed harddrives #82942 by Guilherme Barile.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/raidtools/ChangeLog | 7 | ||||
-rwxr-xr-x | sys-fs/raidtools/files/raidtools.cron | 18 | ||||
-rw-r--r-- | sys-fs/raidtools/raidtools-1.00.3-r3.ebuild | 5 |
3 files changed, 28 insertions, 2 deletions
diff --git a/sys-fs/raidtools/ChangeLog b/sys-fs/raidtools/ChangeLog index 0819eed1c5b8..f1ca4276a650 100644 --- a/sys-fs/raidtools/ChangeLog +++ b/sys-fs/raidtools/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-fs/raidtools # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.15 2005/02/12 02:08:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.16 2005/02/23 00:16:51 vapier Exp $ + + 22 Feb 2005; Mike Frysinger <vapier@gentoo.org> +files/raidtools.cron, + raidtools-1.00.3-r3.ebuild: + Add a simple cron job for scanning for failed harddrives #82942 by Guilherme + Barile. *raidtools-1.00.3-r3 (11 Feb 2005) diff --git a/sys-fs/raidtools/files/raidtools.cron b/sys-fs/raidtools/files/raidtools.cron new file mode 100755 index 000000000000..e06c42b6fd32 --- /dev/null +++ b/sys-fs/raidtools/files/raidtools.cron @@ -0,0 +1,18 @@ +#!/bin/bash +# Cron job to check that raid devices are functional. +# On error cron will mail the fauly mdstat to root. +# md.c appends (F) to a faulty device +# raid1.c and raid5.c list devices as U (operational) or _ (not) +# a _ device may be either hot, standby or bad +# Merlin Hughes <merlin@merlin.org> + +[ -e /proc/mdstat ] || exit 0 + +mdstat=$(</proc/mdstat) + +if [ "${mdstat/(F)}" != "${mdstat}" ] ; then + echo 'WARNING: Some disks in your RAID arrays seem to have failed!' + echo 'Below is the content of /proc/mdstat:' + echo + echo "$mdstat" +fi diff --git a/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild b/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild index 3ca17edfbd07..02f2c28e03ce 100644 --- a/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild +++ b/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild,v 1.1 2005/02/12 02:08:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild,v 1.2 2005/02/23 00:16:51 vapier Exp $ inherit flag-o-matic eutils @@ -46,6 +46,9 @@ src_install() { make install ROOTDIR="${D}" || die if ! use build ; then + exeinto /etc/cron.daily + newexe "${FILESDIR}"/raidtools.cron raidtools + doman *.8 *.5 dodoc README *raidtab raidreconf-HOWTO reconf.notes retry summary dodoc Software-RAID.HOWTO/Software-RAID.HOWTO.txt |