From owner-freebsd-stable@FreeBSD.ORG Sat Aug 21 04:17:13 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E4961065674 for ; Sat, 21 Aug 2010 04:17:13 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE2D58FC19 for ; Sat, 21 Aug 2010 04:17:12 +0000 (UTC) Received: by iwn36 with SMTP id 36so4167658iwn.13 for ; Fri, 20 Aug 2010 21:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:x-enigmail-version :content-type; bh=CGy8YKOXHoajvxNjv3odTB9qRw/0RZZBLVUEdTKaY/k=; b=fc5SUGr6UGsvBzNvt2madbkyAI61DmKs0VS5l07DthD595sjWzNFS+jWHbpNTiviBo H6wsgsx/rpgk12doHKH/s3YtX7p5BeeTkmtAgJT+cLSCIG/tzOBhMC9p9k5VClPMC+aN 4wav4B8+0oABN36r8OZKXBealfk3BjVvfW7kA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :x-enigmail-version:content-type; b=Hvjo94O/QHZ6qr+pE5Omsui0DA9CPGNHbMNa46THxj+gM0EDeG6eGQL7b9Lt8MFUbe agmy0gv9SDkz4j0rXNK5y+aSrALRnGhA9cdoq0X8XC7CqB34Mz0NWtIAQWIcT0tMqCoD V97hGl98MiD5frY5F0gOlHU0lTREwRetzOMAM= Received: by 10.231.15.68 with SMTP id j4mr2530287iba.184.1282364231123; Fri, 20 Aug 2010 21:17:11 -0700 (PDT) Received: from centel.dataix.local (adsl-99-190-84-182.dsl.klmzmi.sbcglobal.net [99.190.84.182]) by mx.google.com with ESMTPS id j2sm3264981iba.6.2010.08.20.21.17.08 (version=SSLv3 cipher=RC4-MD5); Fri, 20 Aug 2010 21:17:10 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C6F5344.6040808@DataIX.net> Date: Sat, 21 Aug 2010 00:17:08 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Alexander Leidinger X-Enigmail-Version: 1.1.2 Content-Type: multipart/mixed; boundary="------------080104090904040603090909" Cc: FreeBSD Stable Subject: Fwd: daily run output 800.scrub-zfs fixups X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 04:17:13 -0000 This is a multi-part message in MIME format. --------------080104090904040603090909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Alexander, Attached is a fix for one problem and one slight overlook for 800.scrub-zfs. The first & second change was probably just an oversight but none the less they both give a false impression of actions taken. Change1: ${daily_scrub_zfs_default_threshold=30} is missng the ':' which would ultimately reset the users supplied value in periodic.conf to 30. Change2: ${_scrub_diff} -le ${_pool_threshold} would cause the scrub to be run on the day after the threshold was met. So I changed '-le' -> '-lt' which causes it to be run on the 30th day instead of the 31st day. Regards & Thank you again for merging this to stable/8. PS: If you would like a PR filed for this I can do that just let me know. -------- Original Message -------- Subject: xxxxxx.dataix.local daily run output Date: Fri, 20 Aug 2010 03:18:09 -0400 (EDT) From: Superuser Root To: root@xxxxxx.dataix.local ...snip... Scrubbing of zfs pools: skipping scrubbing of pool 'exports': last scrubbing is 30 days ago, threshold is set to 30 days -- End of daily output -- --------------080104090904040603090909 Content-Type: text/x-patch; name="800.scrub-zfs.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="800.scrub-zfs.diff" Index: etc/periodic/daily/800.scrub-zfs =================================================================== --- etc/periodic/daily/800.scrub-zfs (revision 211527) +++ etc/periodic/daily/800.scrub-zfs (working copy) @@ -11,7 +11,7 @@ source_periodic_confs fi -: ${daily_scrub_zfs_default_threshold=30} +: ${daily_scrub_zfs_default_threshold:=30} case "$daily_scrub_zfs_enable" in [Yy][Ee][Ss]) @@ -53,7 +53,7 @@ # Now minus last scrub (both in seconds) converted to days. _scrub_diff=$(expr -e \( $(date +%s) - \ $(date -j -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24) - if [ ${_scrub_diff} -le ${_pool_threshold} ]; then + if [ ${_scrub_diff} -lt ${_pool_threshold} ]; then echo " skipping scrubbing of pool '${pool}':" echo " last scrubbing is ${_scrub_diff} days ago, threshold is set to ${_pool_threshold} days" continue --------------080104090904040603090909 Content-Type: text/plain; name="800.scrub-zfs.diff.asc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="800.scrub-zfs.diff.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAABAgAGBQJMb07lAAoJEJBXh4mJ2FR+OF8H/RVSV15D0q2JSYjPrjr0dFSR +dD+GOOU4ZZr5cP1oNsodIbc2CiYia6Y/TUVT39WiHF9+Pu/r9EiYG9fxvTVfeIY pHgW5nrrDDnZU8oRNb/2k7vhwaPMXm5UUw9TlqtOL+Cx3ZpprBE2/I8sRrJutOoo Hf5BaVDosmumJtEykI9Xg4Hkwdq18v+FIBVwxPWb0f0aUwnV9OS9XfCM3Quf50OF ba+94EZH/2gQvGrFHb2jH9c2tYZXvtzEpSuFRFEHrbNPVpO6jjPBIQHN9xvmJwD/ 2Pih6QXBIN7cfwvXpEzzbLSlIMHv7bc8Ushi1/0voIi932JJQr5/VY6DwmQvkRU= =M7Vr -----END PGP SIGNATURE----- --------------080104090904040603090909--