Remove periodic script for ataraid(4) and add instead script for graid(8).
This commit is contained in:
parent
b296309582
commit
401f21aece
@ -95,13 +95,13 @@ daily_news_expire_enable="YES" # Run news.expire
|
|||||||
daily_status_disks_enable="YES" # Check disk status
|
daily_status_disks_enable="YES" # Check disk status
|
||||||
daily_status_disks_df_flags="-l -h" # df(1) flags for check
|
daily_status_disks_df_flags="-l -h" # df(1) flags for check
|
||||||
|
|
||||||
|
# 401.status-graid
|
||||||
|
daily_status_graid_enable="NO" # Check graid(8)
|
||||||
|
|
||||||
# 404.status-zfs
|
# 404.status-zfs
|
||||||
daily_status_zfs_enable="NO" # Check ZFS
|
daily_status_zfs_enable="NO" # Check ZFS
|
||||||
daily_status_zfs_zpool_list_enable="YES" # List ZFS pools
|
daily_status_zfs_zpool_list_enable="YES" # List ZFS pools
|
||||||
|
|
||||||
# 405.status-ata_raid
|
|
||||||
daily_status_ata_raid_enable="NO" # Check ATA raid status
|
|
||||||
|
|
||||||
# 406.status-gmirror
|
# 406.status-gmirror
|
||||||
daily_status_gmirror_enable="NO" # Check gmirror(8)
|
daily_status_gmirror_enable="NO" # Check gmirror(8)
|
||||||
|
|
||||||
|
34
etc/periodic/daily/401.status-graid
Executable file
34
etc/periodic/daily/401.status-graid
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/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_graid_enable" in
|
||||||
|
[Yy][Ee][Ss])
|
||||||
|
echo
|
||||||
|
echo 'Checking status of graid(8) devices:'
|
||||||
|
|
||||||
|
if graid status; then
|
||||||
|
components="$(graid status -s | fgrep -v OPTIMAL)"
|
||||||
|
if [ "${components}" ]; then
|
||||||
|
rc=3
|
||||||
|
else
|
||||||
|
rc=0
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rc=2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*) rc=0;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $rc
|
@ -1,33 +0,0 @@
|
|||||||
#!/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_ata_raid_enable" in
|
|
||||||
[Yy][Ee][Ss])
|
|
||||||
echo
|
|
||||||
echo 'Checking status of ATA raid partitions:'
|
|
||||||
|
|
||||||
rc=0
|
|
||||||
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
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) rc=0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $rc
|
|
@ -8,7 +8,7 @@ FILES= 100.clean-disks \
|
|||||||
200.backup-passwd \
|
200.backup-passwd \
|
||||||
330.news \
|
330.news \
|
||||||
400.status-disks \
|
400.status-disks \
|
||||||
405.status-ata-raid \
|
401.status-graid \
|
||||||
406.status-gmirror \
|
406.status-gmirror \
|
||||||
407.status-graid3 \
|
407.status-graid3 \
|
||||||
408.status-gstripe \
|
408.status-gstripe \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user