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 <r...@xxxxxx.dataix.local> To: r...@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 --
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
-----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-----
_______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"