From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 27 08:20:26 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC373106566B for ; Wed, 27 Apr 2011 08:20:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 822F98FC08 for ; Wed, 27 Apr 2011 08:20:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3R8KQni014614 for ; Wed, 27 Apr 2011 08:20:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3R8KQFV014611; Wed, 27 Apr 2011 08:20:26 GMT (envelope-from gnats) Date: Wed, 27 Apr 2011 08:20:26 GMT Message-Id: <201104270820.p3R8KQFV014611@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jakob Alvermark Cc: Subject: Re: misc/156659: periodic/daily/800.scrub-zfs fails on pool names containing '-' X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jakob Alvermark List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 08:20:26 -0000 The following reply was made to PR misc/156659; it has been noted by GNATS. From: Jakob Alvermark 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