Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I ZFS scrub once a month which takes ~24 hours for the 72TB. For what I can find about how often I should scrub is:

  • very busy pools, once per week
  • not so busy pools, once per month

or run a scrub, measure the time, and adjust accordingly.

But what about online defragmention?

Question

Is online defragmention considered good practice like scrubbing is? And if, how often should I degrag?

share|improve this question
    
Due to the way this question is worded, I feel it necessary to emphasise that a ZFS scrub does not defrag, see Nex7's comment for what a scrub does. The title asks about defrag, most of the body talks about scrub, and the last line asks about defrag, this is why I voted down this question. –  BeowulfNode42 May 25 at 0:56
add comment

1 Answer 1

up vote 1 down vote accepted

This is not something you need to so often. Mainly because there's no notion of online defragmentation in ZFS. That's really only possible by copying the pool data to another pool or rewriting to new storage. Strive to keep your zpools below 70% utilization instead.

share|improve this answer
6  
I would say not /nearly/ so often. A scrub simply reads every block on the system. That's all it does. By virtue of how ZFS handles reads, ZFS will automatically repair any bad blocks when they're read. This means a scrub is only necessary to read data that isn't commonly being read anyway. Thus, the asker's comment of very busy pools once per week and not so busy pools once per month is actually backwards. A very busy pool, especially one that reads the majority of the live data regularly, need not scrub that often. A quiet pool that is rarely accessed should scrub more often. –  Nex7 Dec 8 '13 at 17:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.