What happens if a SCRUB is/has to be aborted?

Status
Not open for further replies.

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I thought might be an important question for people to be aware of. I don't know the answer, but what are the implications if there's a power failure or you need to cancel a SCRUB because your UPS is about to die, or whatever, a disk fails during a scrub?

Is it possible your data could get corrupt?

Is there a way to tell it to abort gracefully?
 
Joined
May 27, 2011
Messages
566
as far as i know, no there is no way to stop it. however it will never corrupt data. ZFS is copy on write so pulling the plug will not corrupt data, data in the cache may not be fully written out but the ZIL will save you from corruption. if a scrub is in progress and you shut off a system, or pull the plug, it will resume when it comes back up.
 

freeflow

Dabbler
Joined
May 29, 2011
Messages
38
zpool scrub -s <Poolname> from the command line will stop an ongoing scrub. FreeNAS 7 had options to stop and start scrubs in the GUI. FreeNAS * doesn't appear to have this in the GUI at present.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Thanks Freeflow, this sounds like this might be useful to add to the shutdown script for UPS's if it's not already there.
 
Joined
May 27, 2011
Messages
566
zpool scrub -s <Poolname> from the command line will stop an ongoing scrub. FreeNAS 7 had options to stop and start scrubs in the GUI. FreeNAS * doesn't appear to have this in the GUI at present.

well i feel dumb...

zpool scrub -s <Poolname> from the command line will stop an ongoing scrub. FreeNAS 7 had options to stop and start scrubs in the GUI. FreeNAS * doesn't appear to have this in the GUI at present.

I'd leave it out. for some reason, the pool was being scrubbed, either you requested it or some form of maintenance did. a pool in the process of being scrubbed can be shut down just fine, and it will remember it was being scrubbed and resume scrubbing when it comes back up.
 

Lucky Sidz

Dabbler
Joined
Aug 25, 2014
Messages
11
thanks
 
Status
Not open for further replies.
Top