Page MenuHomeFreeBSD

Skip unavailable zpools when running zfs pool scrubs
ClosedPublic

Authored by • lidl on Dec 15 2015, 8:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 20, 6:11 PM
Unknown Object (File)
Sun, Sep 20, 12:04 AM
Unknown Object (File)
Thu, Sep 10, 9:11 AM
Unknown Object (File)
Tue, Sep 8, 7:32 PM
Unknown Object (File)
Sep 2 2026, 2:10 PM
Unknown Object (File)
Aug 19 2026, 8:26 AM
Unknown Object (File)
Aug 14 2026, 11:06 AM
Unknown Object (File)
Aug 9 2026, 1:03 PM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

• 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.
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.