Scripted scrub with jail-control?

Status
Not open for further replies.

unca_NAS

Explorer
Joined
Mar 25, 2012
Messages
87
Hello,
Read yesterday about scrub slowness and tweaks to fix it. Got my scrub running in 17 hrs instead of 24+ by closing all jails (bittorrent, vpn, sickrage, CP) and adding scrub priority.

If my assumption is correct that closing jails and plugins during the scrub is a good idea and improves scrub efficiency, can this be scripted something like
- close all active jails
- initiate scrub
- start all active jails
- email scrub results to root user
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
How big is your pool? 24 hours sounds rather long.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
His sig says it's an N36L. Those aren't particularly powerful and can quickly be CPU limited. Not surprisingly, shutting off the jails decreases the workload, which could have a drastic improvement on scrubs. Even 2 years ago they were systems that were mentioned as "great for low power usage, but not great for performance".

As for a script, you could do it with API calls. But you're going to be on your own to figure that out. Nobody here is particularly experienced with the FreeNAS API. Scripting wouldn't work because anything you do in scripts are "behind the back of the WebGUI and FreeNAS config file" so you run serious risk of causing problems that result in a non-viable system.
 

unca_NAS

Explorer
Joined
Mar 25, 2012
Messages
87
4 x 2 TB so active pool size is 5.* TB

CyberJock's advice duly noted, I'm propably better-off as it is (turning jails off-on manually)

Thanks for quick answers!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
To be honest, unless you're *really* irritated with long scrub times I'd just use your server like you normally would during a scrub. Who cares if it takes an extra XYZ hours? My new pool that is much larger takes significantly longer to scrub, but I just keep using my server like normal. It will finish if you just let it be. I'm all about letting stuff do what it's supposed to with minimal intervention. Intervention is where you get those pesky humans involved, and they seem to always make mistakes.
 

SirMaster

Patron
Joined
Mar 19, 2014
Messages
241
If you care to get more into the guts of it OpenZFS does provide tunable parameters to increase the IO priority of your scrubs. You can trade off shorter scrub times for lower pool performance during those scrubs if that suits you better.
 
Status
Not open for further replies.
Top