Project

General

Profile

Actions

Bug #6450

closed

scrub/resilver unnecessarily traverses snapshots created after the scrub started

Added by Matthew Ahrens almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-11-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

If snapshots are being periodically created, scrub/resilver may never complete (or may take a long time to complete). The symptom is that the scrub gets "stuck" at 99+% done (according to "zpool status").

::zfs_dbgmsg reveals that we are traversing a snapshot that was created long after the scrub started. In particular, the scn_cur_min_txg is >= scn_cur_max_txg. This snapshot can't reference any blocks that need to be scrubbed, so we are just wasting time reading its metadata looking for blocks to scrub.

e.g.:
note: current date is Nov ~6 2015

scan: resilver in progress since Mon Sep 21 13:24:03 2015
99.8T scanned out of 100T at 10.8M/s, 15h3m to go
149G resilvered, 99.44% done

scanned dataset 751903 (pool/fs@2015-10-29) with min=12340101 max=11964992; pausing=1

Actions

Also available in: Atom PDF