From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 19 09:00:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C82C1065670; Thu, 19 Aug 2010 09:00:18 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A18B8FC28; Thu, 19 Aug 2010 09:00:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7J90IY9096263; Thu, 19 Aug 2010 09:00:18 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7J90IKu096259; Thu, 19 Aug 2010 09:00:18 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201008190900.o7J90IKu096259@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 19 Aug 2010 09:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211495 - in stable/8: etc/periodic/daily share/man/man5 tools/build/mk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2010 09:00:18 -0000 Author: netchild Date: Thu Aug 19 09:00:17 2010 New Revision: 211495 URL: http://svn.freebsd.org/changeset/base/211495 Log: MFC r209195: Add a periodic zfs scrub script. Features: - configurable amount of days between scrubs (default value or per pool) - do not scrub directly after pool creation (respects the configured number of days between scrubs) - do not scrub if a scrub is in progress - tells how to see the status of the scrub - tells how many days since the last scrub if it skips the scrubbing - warns if a non-existent pool is specified explicitely (default: no pools specified -> all currently imported pools are handled) - runs late in the periodic run to not slow down the other periodic daily scripts r209250: - connect the zfs scrub script - move the zfs status script into the MK_ZFS conditional to respect WITHOUT_ZFS r209253: Add the ZFS periodic daily scripts to the ZFS part. (make delete-old) Requested by: "J. Hellenthal" PR: 149271 Modified: stable/8/etc/periodic/daily/Makefile stable/8/share/man/man5/periodic.conf.5 stable/8/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/8/etc/periodic/daily/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/tools/build/mk/ (props changed) Modified: stable/8/etc/periodic/daily/Makefile ============================================================================== --- stable/8/etc/periodic/daily/Makefile Thu Aug 19 08:50:11 2010 (r211494) +++ stable/8/etc/periodic/daily/Makefile Thu Aug 19 09:00:17 2010 (r211495) @@ -8,7 +8,6 @@ FILES= 100.clean-disks \ 200.backup-passwd \ 330.news \ 400.status-disks \ - 404.status-zfs \ 405.status-ata-raid \ 406.status-gmirror \ 407.status-graid3 \ @@ -53,4 +52,9 @@ FILES+= 150.clean-hoststat \ 500.queuerun .endif +.if ${MK_ZFS} != "no" +FILES+= 404.status-zfs \ + 800.scrub-zfs +.endif + .include Modified: stable/8/share/man/man5/periodic.conf.5 ============================================================================== --- stable/8/share/man/man5/periodic.conf.5 Thu Aug 19 08:50:11 2010 (r211494) +++ stable/8/share/man/man5/periodic.conf.5 Thu Aug 19 09:00:17 2010 (r211495) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2007 +.Dd June 15, 2010 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -611,6 +611,25 @@ when .Va daily_queuerun_enable is set to .Dq Li YES . +.It Va daily_scrub_zfs_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run a zfs scrub periodically. +.It Va daily_scrub_zfs_pools +.Pq Vt str +A space separated list of names of zfs pools to scrub. +If the list is empty or not set, all zfs pools are scrubbed. +.It Va daily_scrub_zfs_default_threshold +.Pq Vt int +Number of days between a scrub if no pool-specific threshold is set. +The default value if no value is set is 30. +.It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold +.Pq Vt int +The same as +.Va daily_scrub_zfs_default_threshold +but specific to the pool +.Va Ns Ao Ar poolname Ac Ns . .It Va daily_local .Pq Vt str Set to a list of extra scripts that should be run after all other Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Thu Aug 19 08:50:11 2010 (r211494) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Thu Aug 19 09:00:17 2010 (r211495) @@ -344,6 +344,8 @@ OLD_FILES+=usr/lib/libuutil.so .if ${MK_ZFS} == no OLD_LIBS+=lib/libzfs.so.1 OLD_LIBS+=lib/libzpool.so.1 +OLD_FILES+=etc/periodic/daily/404.status-zfs +OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_FILES+=sbin/zfs OLD_FILES+=sbin/zpool OLD_FILES+=usr/lib/libzfs.a