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 <root@xxxxxx.dataix.local> 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 -- -------------- next part -------------- A non-text attachment was scrubbed... Name: 800.scrub-zfs.diff Type: text/x-patch Size: 876 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100821/6ac4c61b/800.scrub-zfs.bin -------------- next part -------------- -----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-----
On Sat, 21 Aug 2010 00:17:08 -0400 jhell <jhell@DataIX.net> wrote:> > 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.I will have a look at this.> 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.This depends how you define threshold... I had number of days between scrubs in my mind. Now it depends what I wrote in the man page, if it tells what I had in mind (I don't remember, I have to look at it myself, but I'm not a native english speaker, so I may have not wrote it good enough). This is not set in stone, if the majority of people want something else, I'm surely not in the way. Bye, Alexander.> -------- Original Message -------- > Subject: xxxxxx.dataix.local daily run output > Date: Fri, 20 Aug 2010 03:18:09 -0400 (EDT) > From: Superuser Root <root@xxxxxx.dataix.local> > 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 -- >
On Sat, 21 Aug 2010 00:17:08 -0400 jhell <jhell@DataIX.net> wrote:> > 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.Sorry, but it is not missing the ':'. There is one in front of it. A lot of start scripts in ports use this. You need to use a := instead of a = if you use var=${var:=default_val} but not if you use : ${var=default_val} I have the impression that the ':' in front of the variable is the way it is supposed to be in the start scripts in ports. I adopted this style (one variable name less to type... specially with expressive names this is some amount less to type). And I remember to have tested a lot of cases for the timeout value, overriding a pool specific value and overriding the default where some of them and all worked. If you have a case where it does not work, it would be nice if you could add a "set -x" in the beginning of the script and send me the output of a failing run. Bye, Alexander.