Solved Does it make to do a scrub on a pool that is using zvol from anoter pool?

As FreeBSD's ZFS is not yet capable of native crypto filesets I'm using an extra geli layer to do so. In the big pool pool1 I've created a zvol of a certain size. This zvol is used with geli to create a crypto device which is then used to create pool pool2. I chose to create a pool instead of using the fileset because I'm using different filesets from this pool for different mountpoints.

Does it make sense to scrub on this pool pool2? Scrubbing is done periodically on the pool1.
I don't think so but I do want to hear other opinions too.
 
What are you guarding against? Let's work through a few examples (a complete taxonomy and logic will become clear soon):
  • Undetected disk error, meaning the disk hardware corrupts data. Scrub on pool1 will catch that. Scrub on pool2 might also, but (a) it's harder to debug, (b) the geli layer might catch it instead (and probably a lot less gracefully than ZFS).
  • Memory error which corrupts something before being written, but while already in cache, causing the checksum to be invalid. Could happen anywhere. If it happens early on (before writing something to pool2), then scrub of pool2 can catch it. But scrub of pool1 can not detect this, because to pool1, all the content of pool2 is a random set of bits.
  • Software bug in ZFS. If it hits a block in pool2, that's exactly like the memory error above.
From this I conclude that for best protection, you should probably scrub both. I hate that answer. In particular, you should make sure the two scrubs don't run at the same time (performance with one scrub running can be bad enough, with two simultaneously it will probably really bad). Can someone find an argument why I'm wrong, please? I want to be wrong.
 
I've been doing it for years (pools are scrubbed day apart) but I was in doubt the other day if it's really necessary. Your arguments do make sense.
 
Back
Top