Currently, the periodic script to scrub all zpools looks at the last scrub date via zpool history, but it does not consider cases where a scrub was stopped with zpool scrub -s. For example, consider the zpool history of all scrubs for a zpool like this: 2011-06-05.03:08:27 zpool scrub data 2011-06-13.03:03:50 zpool scrub data 2011-06-19.22:28:49 zpool scrub data 2011-06-19.22:41:49 zpool scrub -s data With the existing logic, the script would consider the last scrub date to be "2011-06-19.22:28:49". However, that particular scrub was stopped, so the last fully completed scrub was actually on "2011-06-13.03:03:50". I have updated the 800.scrub-zfs periodic script to understand when a scrub operation was stopped. As of now, scrub -s will not generate a history entry if a zpool scrub -s is issued while no scrub is in progress. So there is no risk of two scrub -s appearing sequentially. The attached patch handles more than one scrub/scrub -s in a row, e.g. something like this: 2011-06-05.03:08:27 zpool scrub data 2011-06-13.03:03:50 zpool scrub data 2011-06-19.22:28:49 zpool scrub data 2011-06-19.22:41:49 zpool scrub -s data 2011-06-25.03:08:27 zpool scrub data 2011-06-29.03:11:49 zpool scrub -s data It would properly set the last successful scrub date to "2011-06-13.03:03:50". The attached patch is against the 800.scrub-zfs from HEAD, but it should apply cleanly to 8.2-RELEASE and 8.2-STABLE as well. Thanks! Josh Fix: See attached patch. Patch attached with submission follows: How-To-Repeat: Issue a zpool scrub <poolname> then zpool scrub -s <poolname> and the periodic script will think the last successful scrub was today, instead of the last uninterrupted scrub.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>