How do I set up weekly scrubs?

Status
Not open for further replies.

danzg

Contributor
Joined
Jun 18, 2011
Messages
105
I'm trying to get my box to do a scrub every Saturday night. (FreeNAS-8.2.0-RELEASE-p1-x64 (r11950))

I set up a 'ZFS scrub' under 'Storage' as follows:

Threshold: 7
Minute: Each 0
Hour: Each 00
Day: Every 1
Month: All
Day of week: Saturday
Enabled: Check

But it failed to scrub over the weekend.

Am I doing something wrong?
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Looks good, but maybe the threshold should be 6, not sure...

How does /etc/crontab looks like?
 

danzg

Contributor
Joined
Jun 18, 2011
Messages
105
Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.33.2.1 2009/08/03 08:13:06 kensmith Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#
#minute hour    mday    month   wday    who     command
#
*/5     *       *       *       *       root    /usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11    *       *       *       *       operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0       *       *       *       *       root    newsyslog
#
# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31    0-5     *       *       *       root    adjkerntz -a

*/5     *       *       *       *       root    /usr/local/bin/python /usr/local/bin/graph.py
0       *       *       *       *       root    /bin/sh /root/save_rrds.sh

0       *       *       *       *       root    /usr/local/bin/python /usr/local/bin/mfistatus.py > /dev/null 2>&1
*/5     *       *       *       *       root    /usr/local/bin/python /usr/local/www/freenasUI/tools/alert.py > /dev/null 2>&1
*       *       *       *       *       root    /usr/local/bin/python /usr/local/www/freenasUI/tools/autosnap.py > /dev/null 2>&1

15      3       *       *       *       root    /usr/local/bin/python /usr/local/www/freenasUI/tools/cachetool.py expire >/dev/null 2>&1
30      3       *       *       *       root    /usr/local/bin/python /usr/local/www/freenasUI/tools/cachetool.py fill >/dev/null 2>&1
0       3       *       *       *       root    find /tmp/ -iname "sessionid*" -ctime +1d -delete
00      00      *       *       6       root    PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/local/sbin/scrub -t 7 raid-5x3


 

danzg

Contributor
Joined
Jun 18, 2011
Messages
105
I have a feeling that since the scrub takes 12 hours, it 'spills' over into Sunday, so the next Sunday, the 7-day threshold has NOT passed, so it will wait until the following Sunday.

I'll set threshold to 5 days and see what happens...

Code:
00      22      *       *       6       root    PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/local/sbin/scrub -t 5 raid-5x3
 
Status
Not open for further replies.
Top