Date: Wed, 27 Apr 2011 08:20:21 GMT From: Jakob Alvermark <jakob.alvermark@bsdlabs.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/156659: periodic/daily/800.scrub-zfs fails on pool names containing '-' Message-ID: <201104270820.p3R8KLqb014403@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/156659; it has been noted by GNATS. From: Jakob Alvermark <jakob.alvermark@bsdlabs.com> To: bug-followup@freebsd.org Cc: freebsd-gnats-submit@freebsd.org Subject: Re: misc/156659: periodic/daily/800.scrub-zfs fails on pool names containing '-' Date: Wed, 27 Apr 2011 09:51:57 +0200 Hi Jason, I have applied the patch on three systems that has zpools with hyphens = in their pool names. There is no error message when executing it manually, and since the = pools were scrubbed recently it does not scrub them (I have the = threshold set to 7 days), which is the correct behavior, so it looks = good so far. Scrubbing of zfs pools: skipping scrubbing of pool 'filsrv-hby': last scrubbing is 0 days ago, threshold is set to 7 days Thanks for you help! Regars, Jakob Alvermark On 27 apr 2011, at 00:07, Jason J. Hellenthal wrote: >=20 > Jakob, >=20 > I have looked over your report of this. Thank you, I had a feeling = this > was going to come up sooner or later since zpool(8) does not restrict > the name of the pool to not use hyphens and it shouldn't by all means. >=20 > I have created the following patch [1] and would be pleased if you = could > test it out for me. >=20 >=20 > Log: > This patch changes the syntax for which pools with hyphens are parsed > and removes the daily_zfs_scrub_{pool}_threshold and includes that = into > daily_scrub_zfs_pools. >=20 > The values are as such: > poolname:{threshold_value} >=20 > Where: > daily_scrub_zfs_default_threshold=3D"30" > daily_scrub_zfs_pools=3D"foobar:10 fu-bar:20 fu_bar:30 fubar54:5 = fu-bar3:5 > fu_bar7:5 fubar fu-bar fu_bar" >=20 > Equals: > Threshold =3D 10, for pool value foobar:10 > Threshold =3D 20, for pool value fu-bar:20 > Threshold =3D 30, for pool value fu_bar:30 > Threshold =3D 5, for pool value fubar54:5 > Threshold =3D 5, for pool value fu-bar3:5 > Threshold =3D 5, for pool value fu_bar7:5 > Threshold =3D 30, for pool value fubar > Threshold =3D 30, for pool value fu-bar > Threshold =3D 30, for pool value fu_bar >=20 > Since we cannot get around easily the fact that "FOO-BAR" is not a = valid > variable name in sh(1) or any other shells I see this as an easy way = to > accommodate for the variety of pool names that could be present on any > given system with ZFS since pool names cannot be restricted to not use > hyphens. >=20 > This patch will be updated further to change the appropriate manual = pages > once further testing has been received. >=20 >=20 > Patches: > 1). http://patches.jhell.googlecode.com/hg/800.scrub-zfs_hyphen.patch >=20 >=20 > This has been BCC'd to bug-followup@ >=20 > --=20 >=20 > Regards, (jhell) > Jason Hellenthal >=20 > <800.scrub-zfs_hyphen.patch> Jakob Alvermark jakob.alvermark@bsdlabs.com BSDLabs AB Solna, Sweden 556759-7652
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104270820.p3R8KLqb014403>