Page MenuHomeFreeBSD

Skip unavailable zpools when running zfs pool scrubs
ClosedPublic

Authored by lidl on Dec 15 2015, 8:11 PM.

Details

Summary

If a zpool is "UNAVAIL" during the run of 800.scrub-zfs, the
daily run will fail with messages like this:

Scrubbing of zfs pools:
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
expr: syntax error
[: -lt: unexpected operator
   starting scrub of pool 'pool0':
cannot scrub 'pool0': pool is currently unavailable
      consult 'zpool status pool0' for the result
   skipping scrubbing of pool 'sys':
      last scrubbing is 1 days ago, threshold is set to 7 days
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
expr: syntax error
[: -lt: unexpected operator
   starting scrub of pool 'zdata':
cannot scrub 'zdata': pool is currently unavailable
      consult 'zpool status zdata' for the result
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
expr: syntax error
[: -lt: unexpected operator
   starting scrub of pool 'zroot':
cannot scrub 'zroot': pool is currently unavailable
      consult 'zpool status zroot' for the result

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lidl updated this revision to Diff 11327.Dec 15 2015, 8:11 PM
lidl retitled this revision from to Skip unavailable zpools when running zfs pool scrubs.
lidl updated this object.
lidl edited the test plan for this revision. (Show Details)
lidl added a reviewer: rpaulo.
lidl updated this object.Dec 15 2015, 8:16 PM
rpaulo accepted this revision.Dec 16 2015, 3:53 AM
rpaulo edited edge metadata.
This revision is now accepted and ready to land.Dec 16 2015, 3:53 AM
This revision was automatically updated to reflect the committed changes.