Scrub Tasks, only if pool is... "idle"?

Joined
Oct 22, 2019
Messages
3,641
Is there a way to create / edit a Scrub Task to only run if the pool is not undergoing much activity, or is below a certain IOPS threshold?

Overnight, I was sending an entire pool (approximately 5TB of data) to a new offsite USB drive as an emergency backup. Lo' and behold, my Scrub Tasks were set to Sundays at midnight, with a threshold of 35 days, and thanks to Mr. Murphy, this Sunday was the next scheduled scrub for all pools. I started the copy before midnight and headed to bed, to check on the status the next day (today, Sunday.) For the record, I was not aware that my scrubs were scheduled to run this particular Sunday at midnight. I had forgot to check under the "Next Run" date.

Apparently, my system went ahead and scrubbed the entire pools, including the USB pool (since it uses the same name as a previous pool I used on an older USB drive.)

So basically, all at once, this was happening:
  • Sending from main pool (reads)
  • Receiving to USB pool (writes)
  • Scrub of main pool (reads)
  • Scrub of USB pool (reads)
Should have thrown in some S.M.A.R.T. tests for good measure, eh? :wink:

The system must have come to a crawl, and the copy apparently failed halfway through.

So that got me wondering, and hence my question:

"Is there a way to create / edit a Scrub Task to only run if the pool is not undergoing much activity, or is below a certain IOPS threshold?"
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Read this old posting, it might help you. You might just want to change the date you run a scrub if you know you will be moving data over a Sunday on a routine basis.
 
Top