*Any* way to stop/prevent resilvering?

Here you can discuss every aspect of OpenZFS on OS X. Note: not for support requests!

*Any* way to stop/prevent resilvering?

Postby DanielSmedegaardBuus » Tue Feb 05, 2019 7:27 am

Hey :)

I've googled for this quite a bit, and AFAICT, it's not possible to stop a resilver, just possible to somewhat slow it down by fiddling with values in /sys/module/zfs/parameters/ (this is actually on a Linux box as I discovered that my zpool wasn't compatible with O3X).

I've discovered recently that having 10 USB 3.0 drives for a zpool isn't all fun and games. USB bus resets caused by one drive misbehaving can cause incorrect error reports from other drives on the same hub, and may trigger resilvers that cannot be stopped.

ATM, I'm trying to move data off the array and on to backup drives, but the process is not only much slower than needed, it is also growing riskier by the hour, because my zpool is now, for the 14th time, resilvering due it determining that that operation is needed after a hub being reset. If I could just tell zfs to stop resilvering, I could move my data off more quickly, and I'd greatly reduce the risk of drives dying due to the constant scrubbing.

So, I'd be curious to know if any one of you knows of an "official" way of stopping a resilver, or perhaps is code-savvy enough to say that yeah, it might be trivial for me (as in me, who is a developer, just not at this level) to make some hacks and compile a version of zfs that would either completely stop trying to resilver, or maybe honor a parameter that tells it to block.

Thanks in advance,
Daniel :)
DanielSmedegaardBuus
 
Posts: 24
Joined: Thu Aug 28, 2014 11:00 pm

Re: *Any* way to stop/prevent resilvering?

Postby lundman » Wed Feb 06, 2019 12:00 am

You can set zfs_no_scrub_io=1, and since scrub and resilver is the same code, it potentially could affect resilver, but I am not sure.
User avatar
lundman
 
Posts: 527
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: *Any* way to stop/prevent resilvering?

Postby DanielSmedegaardBuus » Thu Feb 07, 2019 7:34 am

Thank you, Lundman :)

I don't know if that actually works — my pool ended up finally completing its resilver at the 14th attempt :o

But it seems like it should, and I'll keep it handy for when this happens again, because I'm sure that it will :)

Thanks again!
DanielSmedegaardBuus
 
Posts: 24
Joined: Thu Aug 28, 2014 11:00 pm

Re: *Any* way to stop/prevent resilvering?

Postby DanielSmedegaardBuus » Thu Feb 21, 2019 6:44 am

Update. While moving data off this pool, I once again triggered a fresh resilver.

I used your zfs_no_scrub_io=1 trick, and quickly the scrub speed increased to multi-gigabytes per second. Needless to say, it finished ridiculously quickly, so clearly it blocks something.

I first assumed that it was somehow "faking" any scrubbing from going on, but googling for it, it becomes clear that what it actually does is to restrict the scrub to just traverse metadata, and skip all data blocks ("Set for no scrub I/O. This results in scrubs not actually scrubbing data and simply doing a metadata crawl of the pool instead." from man).

A bit dangerous if you forgot that you turned it on, but super useful for getting past resilvers that you know to be unneeded.

Thanks again!
DanielSmedegaardBuus
 
Posts: 24
Joined: Thu Aug 28, 2014 11:00 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 0 guests

cron