Date: Mon, 7 Sep 2009 15:30:03 GMT From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-fs@FreeBSD.org Subject: Re: bin/121366: [zfs] [patch] Automatic disk scrubbing from periodic(8) Message-ID: <200909071530.n87FU3ZZ074201@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/121366; it has been noted by GNATS. From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Stefan Moeding <sm@kill-9.net> Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/121366: [zfs] [patch] Automatic disk scrubbing from periodic(8) Date: Mon, 7 Sep 2009 16:58:05 +0200 --QxIEt88oQPsT6QmF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 04, 2008 at 08:46:51PM +0100, Stefan Moeding wrote: >=20 > >Number: 121366 > >Category: bin > >Synopsis: [zfs] [patch] Automatic disk scrubbing from periodic(8) > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-bugs > >State: open > >Quarter: =20 > >Keywords: =20 > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Tue Mar 04 20:10:01 UTC 2008 > >Closed-Date: > >Last-Modified: > >Originator: Stefan Moeding > >Release: FreeBSD 7.0-STABLE i386 > >Organization: > >Environment: > System: FreeBSD elan.setuid.de 7.0-STABLE FreeBSD 7.0-STABLE #23: Sat Mar= 1 14:17:18 CET 2008 root@elan.setuid.de:/usr/obj/usr/src/sys/ELAN i386 > >Description: >=20 > The ZFS Best Practices Guide recommends disk scrubbing on a regular > basis. The attached file fits into the periodic(8) framework to start > a weekly scrub. It will look at all pools and choose one of them on a > round-robin basis depending on the date of the last scrub/resilver > unless there is already a scrub or resilver running. >=20 > The script should probably be installed to run at the end the weekly > schedule to avoid I/O contention from scrubbing and other weekly scripts. >=20 > The new periodic(8) switch 'weekly_zfs_scrubbing_enable' is introduced. >=20 > One drawback: ZFS seems to forget the time of a scrub/resilver when > shutting down. On machines with regular reboots and multiple pools > the script will probably pick the same pool every time. Maybe you can use user properties to remember time of last automatic scrub? A user property has to contain ':' in its name, eg.: # zfs set org.freebsd:lastscrub=3D`date "+%s"` pool # zpool scrub pool You can obtain it later with: # zfs get -H -o value org.freebsd:lastscrub system It can be removed (if needed) with: # zfs inherit org.freebsd:lastscrub system If you like the idea, would you also like to update your script to use it? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --QxIEt88oQPsT6QmF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKpR99ForvXbEpPzQRAhgUAKCIg4jTPS83dMl615OUAvaPo6wYygCfdYLF IWU96OveYlgKxRtKQZhyTlQ= =b6uu -----END PGP SIGNATURE----- --QxIEt88oQPsT6QmF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909071530.n87FU3ZZ074201>