Project

General

Profile

Bug #8473

"zpool scrub" does not detect errors on active spares

Added by Alan Somers about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
2017-07-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Scrubbing is supposed to detect and repair all errors in the pool. However, it wrongly ignores active spare devices. The problem can easily be reproduced in OpenZFS at git rev 0ef125d with these commands:

truncate -s 64m /tmp/a /tmp/b /tmp/c
sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
sudo zpool replace testpool /tmp/a /tmp/c
/bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
sync
sudo zpool scrub testpool
zpool status testpool # Will show 0 errors, which is wrong
sudo zpool offline testpool /tmp/a
sudo zpool scrub testpool
zpool status testpool # Will show errors on /tmp/c, which should've already been fixed

FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more.

History

#1

Updated by Electric Monk about 2 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 554675eee75dd2d7398d960aa5c81083ceb8505a

commit  554675eee75dd2d7398d960aa5c81083ceb8505a
Author: Alan Somers <asomers@gmail.com>
Date:   2017-09-06T23:22:48.000Z

    8473 scrub does not detect errors on active spares
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF