On Sun, 26 Jul 2009, Brian wrote:
as its great for that but I decided to try out ZFS. Now I read that
its advisable to scrub the system every week or month, is it
possible just to make a script that will do this so I dont have to
be there? Also I know ZFS can use blank hard drives that will
This is trivially easy via entries in crontab:
# crontab -l | grep scrub
20 4 * * 1 /usr/sbin/zpool scrub Sun_2540
15 2 * * 0 /usr/sbin/zpool scrub USB_Pool
It is useful to check for faults and send an email to someone in case
there is a problem. I use this script which is also executed via
crontab:
#!/bin/sh
REPORT=/tmp/faultreport.txt
SYSTEM=$1
rm -f $REPORT
/usr/sbin/fmadm faulty 2>&1 > $REPORT
if test -s $REPORT
then
/usr/ucb/Mail -s "$SYSTEM Fault Alert" root < $REPORT
fi
rm -f $REPORT
Since I have multiple systems sending email to the same address, I
supply the identification of the system via an script argument. The
name could be obtained from `uname -n` or `hostname` instead.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss