[zfs-discuss] Re: [zfs] Should zpool scrub use cache?

Jim Klimov jimklimov at cos.ru
Sat May 18 14:32:50 EDT 2013


On 2013-05-18 20:14, Christ Schlacta wrote:
> I just started a zpool scrub on a pool with a cache device, and a
> strange thought occured to me...  I don't believe a zpool scrub should
> touch cache at all.  I may be wrong, but it seems we want to read all
> the data from the disk.  Reading data from the cache bypasses reading it
> from disk...  Please feel encouraged to correct me if I'm wrong, or
> consider this a bug report if I'm not wrong.


I believe it is not wrong, as long as the scrub reads all copies
(for mirrors and copies>1) and/or parity (for raidzN) sectors from
original disks and verifies that they are valid. The scrub needs
to walk the block tree however, and to iterate that it needs the
metadata in memory and/or cache. Backtracking via cache is faster,
so as long as this piece of data has been verified on the original
long-term storage, I don't think there's a problem in speeding up
the scrub.

While writing this, I had a thought: the ARC and/or L2ARC devices
might help in fixing the detected corrupted data - if a copy of
that block with a matching checksum is still available in cache...

//Jim



More information about the zfs-discuss mailing list